From: sashiko-bot@kernel.org
To: "Dapeng Mi" <dapeng1.mi@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/2] perf/core: Cancel PMU mux hrtimer before freeing per-CPU context
Date: Mon, 02 Nov 2026 01:14:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-192800@kernel.org> (raw)
In-Reply-To: <20261102005905.2017784-2-dapeng1.mi@linux.intel.com>
> perf_pmu_free() can free the PMU's per-CPU perf_cpu_pmu_context while
> the multiplexing hrtimer is still armed. Once the timer expires, it
> dereferences the freed cpc and can crash the kernel.
>
> Cancel the multiplexing hrtimer before freeing the PMU context by adding
> a perf_mux_cancel_hrtimer() helper and invoking it from the PMU free
> path.
>
> Reported-by: Hanxiang Xu <xuhx@hust.edu.cn>
> Closes: https://lore.kernel.org/all/ca4f133.14714.1a162b8654c.Coremail.xuhx@hust.edu.cn/
> Fixes: 8f4c4963d283 ("perf/core: Simplify the perf_pmu_register() error path")
> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102005905.2017784-1-dapeng1.mi@linux.intel.com?part=2
next prev parent reply other threads:[~2026-11-02 1:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 0:59 [PATCH 1/2] perf/core: Avoid NULL dereference in mux interval store Dapeng Mi
2026-11-02 0:59 ` [PATCH 2/2] perf/core: Cancel PMU mux hrtimer before freeing per-CPU context Dapeng Mi
2026-11-02 1:14 ` sashiko-bot [this message]
2026-11-02 1:22 ` [PATCH 1/2] perf/core: Avoid NULL dereference in mux interval store sashiko-bot
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=sashiko-outbox-192800@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dapeng1.mi@linux.intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.