]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:28 +0000 (08:36 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Dec 2016 13:17:00 +0000 (14:17 +0100)
commit179fe85e9517ff389140803a19d6be146445ea17
tree7665de31f399a65d876f1ea7042d9fa0cfb689c7
parent5146e88f28eb01480ec55c4aeb37313302c6e760
drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()

A simple assert to ensure that we don't overflow start + size when
initialising the drm_mm, or its scanner.

In future, we may want to switch to tracking the value of ranges (rather
than size) so that we can cover the full u64, for example like resource
tracking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-26-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_mm.c