summaryrefslogtreecommitdiff
path: root/include/linux/root_dev.h
diff options
context:
space:
mode:
authorAboorva Devarajan <aboorvad@linux.ibm.com>2026-06-05 11:29:11 +0300
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-06-15 13:55:21 +0300
commit0ecd26e93e698c8327521910fc6296f5b84a4b92 (patch)
treead17e56375314cd68ce55dbe9f67506160039a80 /include/linux/root_dev.h
parent81e3a86030462824a67d697739cf3f387f4ba350 (diff)
downloadlinux-0ecd26e93e698c8327521910fc6296f5b84a4b92.tar.xz
powerpc/powernv: fix preempt count leak in pnv_kexec_wait_secondaries_down
pnv_kexec_wait_secondaries_down() calls get_cpu() to obtain the current CPU id but never calls the matching put_cpu(), leaking one preempt_disable() nesting level on every invocation. In practice the imbalance does not trigger a visible splat because the kexec teardown path is a one-way trip: IRQs are already disabled, no schedule() occurs after the leak, and default_machine_kexec() overwrites preempt_count with HARDIRQ_OFFSET before jumping into kexec_sequence() which never returns. However the bookkeeping is still wrong. The function only needs the current CPU id, and this path runs with interrupts disabled and the CPU pinned, so the preempt_disable() side-effect of get_cpu() is unnecessary. Replace it with raw_smp_processor_id(). Fixes: 298b34d7d578 ("powerpc/powernv: Fix kexec races going back to OPAL") Signed-off-by: Aboorva Devarajan <aboorvad@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20260605082912.305100-3-aboorvad@linux.ibm.com
Diffstat (limited to 'include/linux/root_dev.h')
0 files changed, 0 insertions, 0 deletions