summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMagnus Lindholm <linmag7@gmail.com>2026-10-10 16:24:29 +0200
committerMagnus Lindholm <linmag7@gmail.com>2026-10-18 00:44:44 +0200
commit0d92845ac5dbc79e4ac4810b33c673f4c1c227e3 (patch)
tree392d6413a8c411bb7a212973d73ab858190ef84b /tools/perf/scripts/python/stackcollapse.py
parent020d2e70b7538b66eee3c3480d2b8921fb182f0c (diff)
downloadlinux-0d92845ac5dbc79e4ac4810b33c673f4c1c227e3.tar.gz
linux-0d92845ac5dbc79e4ac4810b33c673f4c1c227e3.zip
alpha: only use a targeted tbi() when the target mm is really current
ipi_flush_tlb_page() gates a targeted tbi() on current->active_mm. tbi() acts on the address space context currently loaded on the CPU, so it is only guaranteed to reach an mm's translations when a thread of that mm is running there. current->active_mm is not sufficient: under lazy TLB an idle or kernel task keeps an mm as its active_mm while a different ASN is loaded, so the invalidate is issued against the wrong context and the stale entry can survive. Nothing retires the old ASN afterwards either, mm->context[cpu] still being valid, so the resuming thread can reuse it. Test current->mm instead and otherwise fall back to flush_tlb_other(), which clears mm->context[cpu] and forces a fresh ASN at the next switch whatever is loaded now. For an mm borrowed through kthread_use_mm(), patch 1 of this series installs the context before the task can take a shootdown IPI. The current->mm test therefore covers that case as well. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Magnus Lindholm <linmag7@gmail.com> Link: https://lore.kernel.org/r/20261010142533.974797-4-linmag7@gmail.com Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions