]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/udl: add a release method and delay modeset teardown
authorDave Airlie <airlied@redhat.com>
Fri, 5 Apr 2019 03:17:13 +0000 (13:17 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2019 06:37:52 +0000 (08:37 +0200)
commitf7a46b61d3af4ea98bf35d8791485bf35596b567
tree52d5bed990c5edd483d1305f872699d7a103f39c
parent753ff72679f0230cf06ee56c920d1dc622acfd1a
drm/udl: add a release method and delay modeset teardown

commit 9b39b013037fbfa8d4b999345d9e904d8a336fc2 upstream.

If we unplug a udl device, the usb callback with deinit the
mode_config struct, however userspace will still have an open
file descriptor and a framebuffer on that device. When userspace
closes the fd, we'll oops because it'll try and look stuff up
in the object idr which we've destroyed.

This punts destroying the mode objects until release time instead.

Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190405031715.5959-2-airlied@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/udl/udl_drv.c
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/udl/udl_main.c