✗ CI.checkpatch: warning for drm: i915: do not NULL deref hdmi attached_connector
Patchwork
patchwork at emeril.freedesktop.org
Thu Oct 31 10:57:56 UTC 2024
== Series Details ==
Series: drm: i915: do not NULL deref hdmi attached_connector
URL : https://patchwork.freedesktop.org/series/140760/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 30255c530998d9530cdf252c7b0653ace91593dd
Author: Sergey Senozhatsky <senozhatsky at chromium.org>
Date: Thu Oct 31 19:51:35 2024 +0900
drm: i915: do not NULL deref hdmi attached_connector
*** RFC ***
intel_ddi_init() may skip connector initialization, for instance,
both intel_ddi_init_dp_connector() and intel_ddi_init_hdmi_connector()
are optional. This leads to situation that ->attached_connector may
be NULL for some connectors. For instance, on my setup 'DDI A/PHY A'
and 'DDI TC1/PHY TC1' are not initialized.
However, functions like intel_dp_dual_mode_set_tmds_output() and
friends don't take this into consideration. This leads to NULL
ptr-derefs:
KASAN: null-ptr-deref in range [0x0000000000000848-0x000000000000084f]
RIP: 0010:intel_hdmi_encoder_shutdown+0x105/0x230
Call Trace:
<TASK>
i915_driver_shutdown+0x2d8/0x490
pci_device_shutdown+0x83/0x150
device_shutdown+0x4ad/0x660
__se_sys_reboot+0x29c/0x4d0
do_syscall_64+0x60/0x90
Add a new helper to avoid NULL ->attached_connector derefs and
switch some intel_hdmi function to it. I'm not sure if we need
to switch all or just intel_dp_dual_mode_set_tmds_output() (I
have only seen this one doing NULL derefs so far).
Signed-off-by: Sergey Senozhatsky <senozhatsky at chromium.org>
+ /mt/dim checkpatch d9e9e1b912c1ade4d9a46403c691ff3a13d8caaf drm-intel
30255c530998 drm: i915: do not NULL deref hdmi attached_connector
-:110: WARNING:MISSING_FIXES_TAG: The commit message has 'Call Trace:', perhaps it also needs a 'Fixes:' tag?
total: 0 errors, 1 warnings, 0 checks, 67 lines checked
More information about the Intel-xe
mailing list