]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit20f4e732110294287398a4613839a67005340fc9
treee4a676e7fc5df71420ebc061bc215c5adfbbfb38
parentb029ac39205c206a7becf227f00c2f31728b27a4
drm/udl: add a release method and delay modeset teardown

BugLink: https://bugs.launchpad.net/bugs/1838116
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/udl/udl_drv.c
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/udl/udl_main.c