From: Heiko Carstens <hca@linux.ibm.com>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, sumanthk@linux.ibm.com,
japo@linux.ibm.com, agordeev@linux.ibm.com, iii@linux.ibm.com,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH v3] s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks
Date: Tue, 11 Aug 2026 16:43:14 +0200 [thread overview]
Message-ID: <20260811144314.12308Eea-hca@linux.ibm.com> (raw)
In-Reply-To: <20260811133901.3765063-1-tmricht@linux.ibm.com>
On Tue, Aug 11, 2026 at 03:39:01PM +0200, Thomas Richter wrote:
> The command 'perf stat -e cycles -- <command>' crashes the kernel
> when CPUs are hotplug added during that run.
...
> Fixes: 9b9cf3c77e7e ("s390/cpum_cf: rework PER_CPU_DEFINE of struct cpu_cf_events")
> Cc: <stable@vger.kernel.org> # v6.5+
> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> Suggested-by: Heiko Carstens <hca@linux.ibm.com>
> Suggested-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> ---
> arch/s390/kernel/perf_cpum_cf.c | 215 +++++++++++++++++++++-----------
> 1 file changed, 142 insertions(+), 73 deletions(-)
...
> @@ -167,12 +170,14 @@ static void cpum_cf_reset_cpu(void *flags)
> }
>
> /* Free per CPU data when the last event is removed. */
> -static void cpum_cf_free_root(void)
> +static void cpum_cf_free_root(unsigned int num)
> {
> - if (!refcount_dec_and_test(&cpu_cf_root.refcnt))
> + struct cpu_cf_ptr __percpu *p = cpu_cf_root.cfptr;
> +
> + if (!refcount_sub_and_test(num, &cpu_cf_root.refcnt))
> return;
> - free_percpu(cpu_cf_root.cfptr);
> cpu_cf_root.cfptr = NULL;
> + free_percpu(p);
This appears to be an unrelated fix. But anyway:
Acked-by: Heiko Carstens <hca@linux.ibm.com>
prev parent reply other threads:[~2026-08-11 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 13:39 [PATCH v3] s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks Thomas Richter
2026-08-11 14:43 ` Heiko Carstens [this message]
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=20260811144314.12308Eea-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=japo@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sumanthk@linux.ibm.com \
--cc=tmricht@linux.ibm.com \
/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 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.