]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/qxl: Call qxl_bo_unref outside atomic context
authorJeremy Cline <jcline@redhat.com>
Fri, 1 Jun 2018 20:05:32 +0000 (16:05 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commitcac36d94fa19a74e668312b15e701923e0065b6b
tree6f1241141b364daf83bc43ad531296ed87b44c8a
parente2c5037d3091b557240606e6765888b22d5888ad
drm/qxl: Call qxl_bo_unref outside atomic context

BugLink: http://bugs.launchpad.net/bugs/1808185
commit 889ad63d41eea20184b0483e7e585e5b20fb6cfe upstream.

"qxl_bo_unref" may sleep, but calling "qxl_release_map" causes
"preempt_disable()" to be called and "preempt_enable()" isn't called
until "qxl_release_unmap" is used. Move the call to "qxl_bo_unref" out
from in between the two to avoid sleeping from an atomic context.

This issue can be demonstrated on a kernel with CONFIG_LOCKDEP=y by
creating a VM using QXL, using a desktop environment using Xorg, then
moving the cursor on or off a window.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1571128
Fixes: 9428088c90b6 ("drm/qxl: reapply cursor after resetting primary")
Cc: stable@vger.kernel.org
Signed-off-by: Jeremy Cline <jcline@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180601200532.13619-1-jcline@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.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/qxl/qxl_display.c