Skip to contentSkip to conversation

Request to backport "perf/core: Fix WARN in perf_sigtrap()" to 6.12.y, 6.6.y, 6.1.y and 5.15.y

DISCUSSION Applied vineash 2 participants 2 messages Oct 3 – Oct 4 Stable branch

lore
Share & tools
lore

vineash

author
#0 lore 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

maintainer Applied
#1 lore raw
Quoted 4 lines

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()")

Queued for 6.12, 6.6, 6.1 and 5.15, thanks.

Signature · 2 lines
Thanks,
Sasha