]> git.baikalelectronics.ru Git - kernel.git/commit
drm: remove minor-id during unplug
authorDavid Herrmann <dh.herrmann@gmail.com>
Sun, 20 Oct 2013 16:55:44 +0000 (18:55 +0200)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Nov 2013 04:53:24 +0000 (14:53 +1000)
commit7fea905844165c28a4a9afdb1250f39d361d62d8
treebdca814cfcdb52c7ea3398a09cbcc7b206ae6b74
parent3bc0de9b128e7df4ada8bb6fbb0b8156abc29716
drm: remove minor-id during unplug

Don't delay minor removal to drm_put_minor(). Otherwise, user-space can
still open the minor and cause the kernel to oops. Instead, remove the
minor during unplug so any new open() will fail to access this minor.

Note that open() and drm_unplug_minor() are both protected by the global
DRM mutex so we're fine.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_stub.c