]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 31 Oct 2017 11:55:35 +0000 (11:55 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 31 Oct 2017 16:36:46 +0000 (17:36 +0100)
commit13b7be2871e0f1a0e48a9686519b97f26cd168f2
tree51b2af4ce8dcd31bb7f225b2783cfc216ba70aee
parentbba0f602c30a5d71fdae0460faafa31d2755c126
drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

To acquire all modeset locks requires a ww_ctx to be allocated. As this
is the legacy path and the allocation small, to reduce the changes
required (and complex untested error handling) to the legacy drivers, we
simply assume that the allocation succeeds. At present, it relies on the
too-small-to-fail rule, but syzbot found that by injecting a failure
here we would hit the WARN. Document that this allocation must succeed
with __GFP_NOFAIL.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171031115535.15166-1-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_modeset_lock.c