diff options
| author | Magnus Lindholm <linmag7@gmail.com> | 2026-10-10 16:24:30 +0200 |
|---|---|---|
| committer | Magnus Lindholm <linmag7@gmail.com> | 2026-10-18 00:44:44 +0200 |
| commit | c0db730bf05eb3c10c1fae64b19f6913dce129fc (patch) | |
| tree | a418c533a0415b0cea54d4abd2b10844ac19ad97 /arch/alpha/kernel | |
| parent | 0d92845ac5dbc79e4ac4810b33c673f4c1c227e3 (diff) | |
alpha: invalidate the local context in flush_tlb_page()
When the target mm is not the calling CPU's active_mm, flush_tlb_page()
does nothing locally, and smp_call_function() reaches only the other CPUs.
This CPU may still hold translations for the mm and can later reuse the
old ASN together with them.
Add the missing else branch. flush_tlb_other() clears mm->context[cpu] so
a fresh ASN is taken at the next switch. Add this before changing the
current->active_mm test to current->mm: that change will also send lazy
callers here, so their local invalidate must already be in place.
The uniprocessor implementations of flush_tlb_mm() and
flush_icache_user_page() in asm/tlbflush.h and asm/cacheflush.h already
contain exactly this branch.
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-5-linmag7@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'arch/alpha/kernel')
| -rw-r--r-- | arch/alpha/kernel/smp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 1ad448105201..e4ba0aab8a66 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -697,6 +697,9 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) preempt_enable(); return; } + } else { + /* smp_call_function() does not call back into this CPU. */ + flush_tlb_other(mm); } data.vma = vma; |
