All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] powerpc: fix preempt_count imbalances in perf and kexec paths
@ 2026-06-05  8:29 Aboorva Devarajan
  2026-06-05  8:29 ` [PATCH v3 1/3] powerpc/perf: fix preempt count underflow in fsl_emb_pmu_del Aboorva Devarajan
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Aboorva Devarajan @ 2026-06-05  8:29 UTC (permalink / raw)
  To: Madhavan Srinivasan, linuxppc-dev
  Cc: Athira Rajeev, Aboorva Devarajan, Christophe Leroy, linux-kernel,
	Sourabh Jain, Ritesh Harjani, Shrikanth Hegde

Hi all,

This patch series fixes some minor preempt_count bookkeeping issues in
arch/powerpc/ found during a preemption leak audit prompted by the
lazy/full preemption model changes. These are get_cpu/put_cpu and
get_cpu_var/put_cpu_var pairing errors that leave preempt_count
incorrectly elevated or underflowed.

v2 -> v3:
 - Patches 2 and 3: use raw_smp_processor_id() instead of
   smp_processor_id(). Both paths run with interrupts
   disabled, so the plain accessor is sufficient.

v2: https://lore.kernel.org/all/20260603062743.1152253-1-aboorvad@linux.ibm.com/

v1: https://lore.kernel.org/all/20260518050855.1147242-1-aboorvad@linux.ibm.com/

Testing:
 - Patches 2 and 3: kexec boot-tested on PowerNV (powernv_defconfig)
   and pseries (pseries_defconfig).
 - Patch 1: compile-tested only (ppc64e_defconfig + CONFIG_FSL_EMB_PERFMON);
   no e500/fsl_emb hardware to runtime-test.

Please let me know your comments.

Thanks,
Aboorva

Aboorva Devarajan (3):
  powerpc/perf: fix preempt count underflow in fsl_emb_pmu_del
  powerpc/powernv: fix preempt count leak in
    pnv_kexec_wait_secondaries_down
  powerpc/kexec: fix double get_cpu() imbalance in kexec_prepare_cpus

 arch/powerpc/kexec/core_64.c           | 4 +---
 arch/powerpc/perf/core-fsl-emb.c       | 3 ++-
 arch/powerpc/platforms/powernv/setup.c | 3 ++-
 3 files changed, 5 insertions(+), 5 deletions(-)


base-commit: 03da3bc22934393e1dcc63ed3c50457b6d7e345e
-- 
2.54.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-19  6:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05  8:29 [PATCH v3 0/3] powerpc: fix preempt_count imbalances in perf and kexec paths Aboorva Devarajan
2026-06-05  8:29 ` [PATCH v3 1/3] powerpc/perf: fix preempt count underflow in fsl_emb_pmu_del Aboorva Devarajan
2026-06-05  8:29 ` [PATCH v3 2/3] powerpc/powernv: fix preempt count leak in pnv_kexec_wait_secondaries_down Aboorva Devarajan
2026-06-05  8:29 ` [PATCH v3 3/3] powerpc/kexec: fix double get_cpu() imbalance in kexec_prepare_cpus Aboorva Devarajan
2026-06-05 11:03   ` Shrikanth Hegde
2026-06-19  6:15 ` [PATCH v3 0/3] powerpc: fix preempt_count imbalances in perf and kexec paths Ritesh Harjani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.