Linux Perf Users
 help / color / mirror / Atom feed
From: vineash <vineash30640@gmail.com>
To: stable@vger.kernel.org
Cc: penguin-kernel@I-love.SAKURA.ne.jp, linux-perf-users@vger.kernel.org
Subject: Request to backport "perf/core: Fix WARN in perf_sigtrap()" to 6.12.y, 6.6.y, 6.1.y and 5.15.y
Date: Sun, 04 Oct 2026 04:25:31 +0800	[thread overview]
Message-ID: <179105913174.1859134.5466929391582828993@gmail.com> (raw)

Hi,

Please consider backporting the following upstream commit to the 6.12.y,
6.6.y, 6.1.y and 5.15.y stable trees:

  3da6bb419750 ("perf/core: Fix WARN in perf_sigtrap()")

It was picked up by AUTOSEL for these trees on 2025-07-14 and nobody
objected, but it never got into any of them. As of 2026-10-03,
linux-6.12.y, linux-6.6.y, linux-6.1.y and linux-5.15.y still have the
old check order in perf_sigtrap(). linux-6.18.y already has the fix.

The WARN is still reachable on 6.12.110. A syzkaller C reproducer
triggers it from the exit path:

  WARNING: CPU: 1 PID: 1904 at kernel/events/core.c:6908 perf_pending_task+0x368/0x430
   task_work_run+0x14e/0x250
   do_exit+0xb5d/0x2ca0
   do_group_exit+0xd3/0x2a0
   get_signal+0x2791/0x2800

This is the scenario the commit describes: exit_task_work() runs after
perf_event_exit_task_context() has set ctx->task to TASK_TOMBSTONE.

Testing on 6.12.110 (QEMU/KVM, x86_64, same .config for both kernels):
  - unpatched: the reproducer triggered the WARN in 3 of 3 runs, each
    within about 30 s
  - with 3da6bb419750 cherry-picked (applies cleanly, offset only): no WARN
    in 3 of 3 runs of 240-300 s each

I only tested 6.12.y. For the other trees I only checked that the fix is
missing.

I found this while triaging syzkaller crashes. An LLM-based assistant
helped with the analysis and ran the tests described above.

Thanks,
vineash

             reply	other threads:[~2026-10-03 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 20:25 vineash [this message]
2026-10-04 16:29 ` Request to backport "perf/core: Fix WARN in perf_sigtrap()" to 6.12.y, 6.6.y, 6.1.y and 5.15.y Sasha Levin

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=179105913174.1859134.5466929391582828993@gmail.com \
    --to=vineash30640@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=stable@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