summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorAboorva Devarajan <aboorvad@linux.ibm.com>2026-06-05 11:29:10 +0300
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-06-15 13:55:21 +0300
commit81e3a86030462824a67d697739cf3f387f4ba350 (patch)
treed5f2ecfb86906a14ed6b15c5dccc5055bd34280e /include/linux/workqueue.h
parent97f902dd4c99f8d085da5343dc58ae4f6ce7bdd9 (diff)
downloadlinux-81e3a86030462824a67d697739cf3f387f4ba350.tar.xz
powerpc/perf: fix preempt count underflow in fsl_emb_pmu_del
fsl_emb_pmu_del() unconditionally calls put_cpu_var(cpu_hw_events) at the 'out:' label, but only calls the matching get_cpu_var() after the 'i < 0' early-return check. When event->hw.idx is negative the function jumps to 'out:' without having taken get_cpu_var(), and the trailing put_cpu_var() then issues an unmatched preempt_enable(), underflowing preempt_count. On a CONFIG_PREEMPT=y kernel preempt_count would underflow and eventually present as a 'scheduling while atomic' BUG. Move put_cpu_var() to pair with get_cpu_var() so the percpu access is correctly bracketed and the 'out:' label only handles perf_pmu_enable. Fixes: a11106544f33 ("powerpc/perf: e500 support") Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com> 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-2-aboorvad@linux.ibm.com
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions