Skip to content

Commit 7fde14d

Browse files
lztojwrdegoede
authored andcommitted
drm/privacy-screen: honor acpi=off in detect_thinkpad_privacy_screen
when acpi=off is provided in bootarg, kernel crash with [ 1.252739] BUG: kernel NULL pointer dereference, address: 0000000000000018 [ 1.258308] Call Trace: [ 1.258490] ? acpi_walk_namespace+0x147/0x147 [ 1.258770] acpi_get_devices+0xe4/0x137 [ 1.258921] ? drm_core_init+0xc0/0xc0 [drm] [ 1.259108] detect_thinkpad_privacy_screen+0x5e/0xa8 [drm] [ 1.259337] drm_privacy_screen_lookup_init+0xe/0xe85 [drm] The reason is that acpi_walk_namespace expects acpi related stuff initialized but in fact it wouldn't when acpi is set to off. In this case we should honor acpi=off in detect_thinkpad_privacy_screen(). Signed-off-by: Tong Zhang <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 76cea3d commit 7fde14d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/drm_privacy_screen_x86.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ static bool __init detect_thinkpad_privacy_screen(void)
3333
unsigned long long output;
3434
acpi_status status;
3535

36+
if (acpi_disabled)
37+
return false;
38+
3639
/* Get embedded-controller handle */
3740
status = acpi_get_devices("PNP0C09", acpi_set_handle, NULL, &ec_handle);
3841
if (ACPI_FAILURE(status) || !ec_handle)

0 commit comments

Comments
 (0)