]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/gud: fix NULL fb and crtc dereferences on USB disconnect
authorShenghao Yang <me@shenghaoyang.info>
Wed, 31 Dec 2025 05:50:26 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:21:13 +0000 (11:21 +0100)
commita255ec07f91d4c73a361a28b7a3d82f5710245f1
treec91ee831189b889810cedd67d96b345e3da81c21
parent67dfd9e8567cc4a1063013bdd14f45ead6ab3297
drm/gud: fix NULL fb and crtc dereferences on USB disconnect

commit dc2d5ddb193e363187bae2ad358245642d2721fb upstream.

On disconnect drm_atomic_helper_disable_all() is called which
sets both the fb and crtc for a plane to NULL before invoking a commit.

This causes a kernel oops on every display disconnect.

Add guards for those dereferences.

Cc: <stable@vger.kernel.org> # 6.18.x
Fixes: 73cfd166e045 ("drm/gud: Replace simple display pipe with DRM atomic helpers")
Signed-off-by: Shenghao Yang <me@shenghaoyang.info>
Reviewed-by: Ruben Wauters <rubenru09@aol.com>
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Link: https://patch.msgid.link/20251231055039.44266-1-me@shenghaoyang.info
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/gud/gud_pipe.c