Commit bafb056ce279 ("sparc64: remove mm_cpumask clearing to fix kthread_use_mm race") fixed this for sparc64, but missed the same bug in sparc32. Fix it similarly. Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> --- arch/sparc/mm/srmmu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index a9aa6a92c7fe..fefbd08bdc91 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -1670,12 +1670,8 @@ static void smp_flush_tlb_mm(struct mm_struct *mm) cpumask_t cpu_mask; cpumask_copy(&cpu_mask, mm_cpumask(mm)); cpumask_clear_cpu(smp_processor_id(), &cpu_mask); - if (!cpumask_empty(&cpu_mask)) { + if (!cpumask_empty(&cpu_mask)) xc1((smpfunc_t) local_ops->tlb_mm, (unsigned long) mm); - if (atomic_read(&mm->mm_users) == 1 && current->active_mm == mm) - cpumask_copy(mm_cpumask(mm), - cpumask_of(smp_processor_id())); - } local_ops->tlb_mm(mm); } } -- 2.23.0