The quilt patch titled Subject: lazy tlb: consolidate lazy tlb mm switching fix has been removed from the -mm tree. Its filename was lazy-tlb-consolidate-lazy-tlb-mm-switching-fix.patch This patch was dropped because it was folded into lazy-tlb-consolidate-lazy-tlb-mm-switching.patch ------------------------------------------------------ From: Nicholas Piggin <npiggin@xxxxxxxxx> Subject: lazy tlb: consolidate lazy tlb mm switching fix Date: Wed, 7 Jun 2023 10:56:22 +1000 Fix an upstream powerpc bug that was discovered with a WARN_ON added in "lazy tlb: consolidate lazy tlb mm switching": Switching mm and tinkering with current->active_mm should be done with irqs disabled. There is a path where exit_lazy_flush_tlb can be called with irqs enabled: exit_lazy_flush_tlb flush_type_needed __flush_all_mm tlb_finish_mmu exit_mmap Which results in the switching being incorrectly with irqs enabled. Link: https://lore.kernel.org/linuxppc-dev/87a5xcgopc.fsf@mail.lhotse/T/#m105488939d0cd9f980978ed2fdeeb89bf731e673 I will send that fix upstream, which will end up conflicting with these. The resolution will be to take akpm's side of the merge (with this patch). Or drop the patch when it conflicts and I'll resend it rebased on the fix. Link: https://lkml.kernel.org/r/20230607005622.583318-1-npiggin@xxxxxxxxx Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> Cc: Sachin Sant <sachinp@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/powerpc/mm/book3s64/radix_tlb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/arch/powerpc/mm/book3s64/radix_tlb.c~lazy-tlb-consolidate-lazy-tlb-mm-switching-fix +++ a/arch/powerpc/mm/book3s64/radix_tlb.c @@ -795,8 +795,16 @@ void exit_lazy_flush_tlb(struct mm_struc goto out; if (current->active_mm == mm) { - /* Is a kernel thread and is using mm as the lazy tlb */ + unsigned long flags; + + /* + * It is a kernel thread and is using mm as the lazy tlb, so + * switch it to init_mm. This is not always called from IPI + * (e.g., flush_type_needed), so must disable irqs. + */ + local_irq_save(flags); kthread_end_lazy_tlb_mm(); + local_irq_restore(flags); } /* _ Patches currently in -mm which might be from npiggin@xxxxxxxxx are lazy-tlb-fix-hotplug-exit-race-with-mmu_lazy_tlb_shootdown.patch lazy-tlb-consolidate-lazy-tlb-mm-switching.patch