]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf
authorKarol Herbst <kherbst@redhat.com>
Tue, 5 Mar 2024 13:38:52 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:40 +0000 (15:28 +0200)
commitc288a61a48ddb77ec097e11ab81b81027cd4e197
treec12b0c0aad30294d24538aa62c0663cd3bc135f7
parent6887314f5356389fc219b8152e951ac084a10ef7
drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf

commit daf8739c3322a762ce84f240f50e0c39181a41ab upstream.

If VM_BIND is enabled on the client the legacy submission ioctl can't be
used, however if a client tries to do so regardless it will return an
error. In this case the clients mutex remained unlocked leading to a
deadlock inside nouveau_drm_postclose or any other nouveau ioctl call.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: <stable@vger.kernel.org> # v6.6+
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240305133853.2214268-1-kherbst@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nouveau_gem.c