diff options
| author | Magnus Lindholm <linmag7@gmail.com> | 2026-10-10 16:24:33 +0200 |
|---|---|---|
| committer | Magnus Lindholm <linmag7@gmail.com> | 2026-10-18 00:44:45 +0200 |
| commit | 721bb7a129771f0ff9cef1dd5abfc106ef65feba (patch) | |
| tree | 6d01de389b571042bdda0250d7cac1058de048cf /tools/perf/scripts/python/stackcollapse.py | |
| parent | c825bf802a7a43fd302c879ef25c975e067a2e94 (diff) | |
| download | linux-721bb7a129771f0ff9cef1dd5abfc106ef65feba.tar.gz linux-721bb7a129771f0ff9cef1dd5abfc106ef65feba.zip | |
alpha: invalidate the local context in flush_tlb_mm()
flush_tlb_mm() has the same caller-CPU omission that was fixed in
flush_tlb_page(): when the target mm is not the calling CPU's active_mm
nothing happens locally, and smp_call_function() handles only the other
CPUs, so this CPU may later reuse the old ASN together with the
translations it still holds.
The active_mm test itself is left alone here. That path calls
flush_tlb_current(), which loads a fresh context through
__load_new_mm_context() rather than issuing a targeted tbi() against
whatever ASN happens to be loaded, so it does not depend on which context
is current.
The uniprocessor implementation in asm/tlbflush.h already has the missing
branch. Counted over a fork-heavy run, flush_tlb_mm() was entered with the
mm not this CPU's active_mm 2934 times, and 632 times while otherwise idle.
The proposed Alpha hugetlb support routes hugetlb invalidations through
flush_tlb_range(), which calls this function. Unmapping or migrating a
hugetlb folio from another context will also need this local invalidate.
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-8-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
