aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorLeo Yan <[email protected]>2025-06-25 17:07:37 +0000
committerIngo Molnar <[email protected]>2025-06-26 08:50:37 +0000
commit1476b218327b89bbb64c14619a2d34f0c320f2c3 (patch)
tree67e6acda2e438c804eeb8921f07688d1e142582f /lib/crypto/mpi/mpi-cmp.c
parentLinux 6.16-rc3 (diff)
downloadkernel-1476b218327b89bbb64c14619a2d34f0c320f2c3.tar.gz
kernel-1476b218327b89bbb64c14619a2d34f0c320f2c3.zip
perf/aux: Fix pending disable flow when the AUX ring buffer overruns
If an AUX event overruns, the event core layer intends to disable the event by setting the 'pending_disable' flag. Unfortunately, the event is not actually disabled afterwards. In commit: ca6c21327c6a ("perf: Fix missing SIGTRAPs") the 'pending_disable' flag was changed to a boolean. However, the AUX event code was not updated accordingly. The flag ends up holding a CPU number. If this number is zero, the flag is taken as false and the IRQ work is never triggered. Later, with commit: 2b84def990d3 ("perf: Split __perf_pending_irq() out of perf_pending_irq()") a new IRQ work 'pending_disable_irq' was introduced to handle event disabling. The AUX event path was not updated to kick off the work queue. To fix this bug, when an AUX ring buffer overrun is detected, call perf_event_disable_inatomic() to initiate the pending disable flow. Also update the outdated comment for setting the flag, to reflect the boolean values (0 or 1). Fixes: 2b84def990d3 ("perf: Split __perf_pending_irq() out of perf_pending_irq()") Fixes: ca6c21327c6a ("perf: Fix missing SIGTRAPs") Signed-off-by: Leo Yan <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: James Clark <[email protected]> Reviewed-by: Yeoreum Yun <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Liang Kan <[email protected]> Cc: Marco Elver <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions