aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/mm.c
diff options
context:
space:
mode:
authorDapeng Mi <dapeng1.mi@linux.intel.com>2025-10-15 13:18:28 +0800
committerIngo Molnar <mingo@kernel.org>2025-11-03 11:04:19 +0100
commiteb3182ef0405ff2f6668fd3e5ff9883f60ce8801 (patch)
treefb6cc6a2fe34709757e367e8d4e60e237f8fbe63 /rust/helpers/mm.c
parentLinux 6.18-rc4 (diff)
downloadlinux-eb3182ef0405ff2f6668fd3e5ff9883f60ce8801.tar.gz
linux-eb3182ef0405ff2f6668fd3e5ff9883f60ce8801.zip
perf/core: Fix system hang caused by cpu-clock usage
cpu-clock usage by the async-profiler tool can trigger a system hang, which got bisected back to the following commit by Octavia Togami: 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage") causes this issue The root cause of the hang is that cpu-clock is a special type of SW event which relies on hrtimers. The __perf_event_overflow() callback is invoked from the hrtimer handler for cpu-clock events, and __perf_event_overflow() tries to call cpu_clock_event_stop() to stop the event, which calls htimer_cancel() to cancel the hrtimer. But that's a recursion into the hrtimer code from a hrtimer handler, which (unsurprisingly) deadlocks. To fix this bug, use hrtimer_try_to_cancel() instead, and set the PERF_HES_STOPPED flag, which causes perf_swevent_hrtimer() to stop the event once it sees the PERF_HES_STOPPED flag. [ mingo: Fixed the comments and improved the changelog. ] Closes: https://lore.kernel.org/all/CAHPNGSQpXEopYreir+uDDEbtXTBvBvi8c6fYXJvceqtgTPao3Q@mail.gmail.com/ Fixes: 18dbcbfabfff ("perf: Fix the POLL_HUP delivery breakage") Reported-by: Octavia Togami <octavia.togami@gmail.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Octavia Togami <octavia.togami@gmail.com> Cc: stable@vger.kernel.org Link: https://github.com/lucko/spark/issues/530 Link: https://patch.msgid.link/20251015051828.12809-1-dapeng1.mi@linux.intel.com
Diffstat (limited to 'rust/helpers/mm.c')
0 files changed, 0 insertions, 0 deletions
w=1'>SubmittingPatches: tighten wording on "sign-off" procedureJunio C Hamano1-1/+1 2021-01-06The first batch in 2.31 cycleJunio C Hamano3-2/+34 2021-01-06mergetool--lib: fix '--tool-help' to correctly show available toolsPhilippe Blain2-2/+15 2021-01-06t4129: don't fail if setgid is set in the test directoryMatheus Tavares1-2/+7 2021-01-06builtin/*: update usage formatZheNing Hu7-61/+61 2021-01-06parse-options: format argh like error messagesJunio C Hamano1-3/+3 2021-01-06p7519: allow running without watchman prereqTaylor Blau1-1/+6 2021-01-05maintenance: use Windows scheduled tasksDerrick Stolee3-1/+226 2021-01-05maintenance: use launchctl on macOSDerrick Stolee3-1/+286 2021-01-04completion: add proper public __git_completeFelipe Contreras2-8/+46 2021-01-04test: completion: add tests for __git_completeFelipe Contreras1-0/+8 2021-01-04completion: bash: improve function detectionFelipe Contreras1-1/+1 2021-01-04completion: bash: add __git_have_func helperFelipe Contreras1-3/+7 2021-01-04rebase: verify commit parameterRené Scharfe1-1/+3 2021-01-04revision: trace topo-walk statisticsDerrick Stolee1-0/+31 2021-01-04hash-lookup: rename from sha1-lookupMartin Ågren14-25/+25 2021-01-04sha1-lookup: rename `sha1_pos()` as `hash_pos()`Martin Ågren8-15/+15 2021-01-04object-file.c: rename from sha1-file.cMartin Ågren4-7/+7 2021-01-04object-name.c: rename from sha1-name.cMartin Ågren4-11/+11 2021-01-04pack-format.txt: document sizes at start of delta dataMartin Ågren1-1/+16 2021-01-04t6016: move to lib-log-graph.sh frameworkAntonio Russo1-187/+167 2021-01-04t1300: don't needlessly work with `core.foo` configsMartin Ågren1-30/+30 2021-01-04t1300: remove duplicate test for `--file no-such-file`Martin Ågren1-6/+2 2021-01-04t1300: remove duplicate test for `--file ../foo`Martin Ågren1-4/+0 2021-01-04gitmodules.txt: fix 'GIT_WORK_TREE' variable namePhilippe Blain1-15/+15 2021-01-04doc: fix some typosThomas Ackermann6-7/+7 2020-12-27Git 2.30v2.30.0Junio C Hamano2-12/+9 2020-12-27l10n: zh_CN: for git v2.30.0 l10n round 1 and 2Jiang Xin1-2475/+2588 2020-12-25l10n: zh_TW.po: v2.30.0 round 2 (1 untranslated)pan934121-2744/+2602 2020-12-23l10n: pl.po: add translation and set team leaderArusekk2-8992/+22386 2020-12-23Git 2.30-rc2v2.30.0-rc2Junio C Hamano2-1/+6