Files
openwrt-armor-g5/target/linux/bcm27xx/patches-6.6/950-1084-drm-vc4-Fix-potential-null-pointer-read-when-disabli.patch
domenico 27c9d80f51
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 12:51:15 +02:00

32 lines
1.0 KiB
Diff

From 1e53604087930e7cf42eee3d42572d0d6f54c86a Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Tue, 7 May 2024 11:44:49 +0100
Subject: [PATCH 1084/1085] drm/vc4: Fix potential null pointer read when
disabling vblank
vc4_disable_vblank assumed that vc4_encoder was always assigned,
which isn't guaranteed.
If it isn't assigned then disable the interrupt anyway as it's
not connected.
https://github.com/raspberrypi/linux/issues/6146
Fixes: 63c0bcc4b747 ("drm/vc4: Add option to call from crtc to encoder on vblank")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -834,7 +834,7 @@ static void vc4_disable_vblank(struct dr
if (!drm_dev_enter(dev, &idx))
return;
- if (vc4_encoder->type != VC4_ENCODER_TYPE_DSI0)
+ if (!vc4_encoder || vc4_encoder->type != VC4_ENCODER_TYPE_DSI0)
CRTC_WRITE(PV_INTEN, 0);
drm_dev_exit(idx);