From: Sumanth Korikkar <sumanthk@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Jan Polensky <japo@linux.ibm.com>,
linux-s390 <linux-s390@vger.kernel.org>
Cc: sumanthk@linux.ibm.com
Subject: [PATCH 0/2] s390/cpum_cf: Check session cpu mask during hotplug
Date: Tue, 6 Oct 2026 13:13:02 +0200 [thread overview]
Message-ID: <20261006111304.4023017-1-sumanthk@linux.ibm.com> (raw)
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
next reply other threads:[~2026-10-06 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 11:13 Sumanth Korikkar [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261006111304.4023017-1-sumanthk@linux.ibm.com \
--to=sumanthk@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=japo@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox