Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/2] s390/cpum_cf: Check session cpu mask during hotplug
@ 2026-10-06 11:13 Sumanth Korikkar
  2026-10-06 11:13 ` [PATCH 1/2] s390/cpum_cf: Check session mask before cpu offline Sumanth Korikkar
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sumanth Korikkar @ 2026-10-06 11:13 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Ilya Leoshkevich, Christian Borntraeger, Jan Polensky, linux-s390
  Cc: sumanthk

The cpu hotplug callbacks start and stop counter sets for every active
hwctr session without checking the session cpu mask. This causes a
reference count underflow when an unrelated cpu goes offline, and
silently adds cpus to a session when they come online.

Patch 1 fixes the reference count underflow in cfset_offline_cpu() and
is suitable for stable kernels. It does not change the online behavior,
so no matching lshwc change is required.

Patch 2 extends the mask check to cfset_online_cpu() and keeps the
userspace provided cpu mask unchanged across hotplug events. It requires
a matching lshwc change and is therefore kept separate from patch 1.

Sumanth Korikkar (2):
  s390/cpum_cf: Check session mask before cpu offline
  s390/cpum_cf: Honor hwctr session cpu mask during hotplug

 arch/s390/kernel/perf_cpum_cf.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-10-06 14:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 11:13 [PATCH 0/2] s390/cpum_cf: Check session cpu mask during hotplug Sumanth Korikkar
2026-10-06 11:13 ` [PATCH 1/2] s390/cpum_cf: Check session mask before cpu offline Sumanth Korikkar
2026-10-06 11:24   ` sashiko-bot
2026-10-06 11:13 ` [PATCH 2/2] s390/cpum_cf: Honor hwctr session cpu mask during hotplug Sumanth Korikkar
2026-10-06 11:24   ` sashiko-bot
2026-10-06 11:53     ` Sumanth Korikkar
2026-10-06 14:04 ` [PATCH 0/2] s390/cpum_cf: Check " Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox