Skip to content

Commit

Permalink
[PATCH] drm/mm: Fix support 4 GiB and larger ranges
Browse files Browse the repository at this point in the history
bad argument if(tmp)... in check_free_hole

fix oops: kernel BUG at drivers/gpu/drm/drm_mm.c:305!

[airlied: excellent, this was my task for today].

Signed-off-by: Krzysztof Kolasa <[email protected]>
Reviewed-by: Chris wilson <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
kolasa authored and airlied committed Mar 15, 2015
1 parent 6981e2a commit 046d669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static int check_free_hole(u64 start, u64 end, u64 size, unsigned alignment)
unsigned rem;

rem = do_div(tmp, alignment);
if (tmp)
if (rem)
start += alignment - rem;
}

Expand Down

0 comments on commit 046d669

Please sign in to comment.