Commit 32a48db4 authored by Yunhui Cui's avatar Yunhui Cui Committed by Greg Kroah-Hartman
Browse files

ACPI: CPPC: Fix NULL pointer dereference when nosmp is used



[ Upstream commit 15eece6c ]

With nosmp in cmdline, other CPUs are not brought up, leaving
their cpc_desc_ptr NULL. CPU0's iteration via for_each_possible_cpu()
dereferences these NULL pointers, causing panic.

Panic backtrace:

[    0.401123] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000b8
...
[    0.403255] [<ffffffff809a5818>] cppc_allow_fast_switch+0x6a/0xd4
...
Kernel panic - not syncing: Attempted to kill init!

Fixes: 3cc30dd0 ("cpufreq: CPPC: Enable fast_switch")
Reported-by: default avatarXu Lu <luxu.kernel@bytedance.com>
Signed-off-by: default avatarYunhui Cui <cuiyunhui@bytedance.com>
Link: https://patch.msgid.link/20250604023036.99553-1-cuiyunhui@bytedance.com


[ rjw: New subject ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c3892f1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment