diff options
| author | Ben Horgan <ben.horgan@arm.com> | 2026-03-06 18:27:16 +0000 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-03-13 14:17:30 +0000 |
| commit | 4ad79c874e53ebb7fe3b8ae7ac6c858a2121f415 (patch) | |
| tree | f5461fbaa9281117ff0ff7f5f91f3bcf2854fd86 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git | |
| parent | d499e9627d70b1269020d59b95ed3e18bee6b8cd (diff) | |
arm_mpam: Fix null pointer dereference when restoring bandwidth counters
When an MSC supporting memory bandwidth monitoring is brought offline and
then online, mpam_restore_mbwu_state() calls __ris_msmon_read() via ipi to
restore the configuration of the bandwidth counters. It doesn't care about
the value read, mbwu_arg.val, and doesn't set it leading to a null pointer
dereference when __ris_msmon_read() adds to it. This results in a kernel
oops with a call trace such as:
Call trace:
__ris_msmon_read+0x19c/0x64c (P)
mpam_restore_mbwu_state+0xa0/0xe8
smp_call_on_cpu_callback+0x1c/0x38
process_one_work+0x154/0x4b4
worker_thread+0x188/0x310
kthread+0x11c/0x130
ret_from_fork+0x10/0x20
Provide a local variable for val to avoid __ris_msmon_read() dereferencing
a null pointer when adding to val.
Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management")
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
