[PATCH v2 25/40] drm: Detect overflow in drm_mm_reserve_node()

2016-12-16 Thread Joonas Lahtinen
On pe, 2016-12-16 at 07:47 +, Chris Wilson wrote: > Protect ourselves from a caller passing in node.start + node.size that > will overflow and trick us into reserving that node. > > Signed-off-by: Chris Wilson I was about to suggest an additional check (but didn't). A combined check is much

[PATCH v2 25/40] drm: Detect overflow in drm_mm_reserve_node()

2016-12-16 Thread Chris Wilson
Protect ourselves from a caller passing in node.start + node.size that will overflow and trick us into reserving that node. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm