We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 719dfd5 commit dfaed3eCopy full SHA for dfaed3e
arch/powerpc/mm/book3s64/radix_tlb.c
@@ -795,12 +795,20 @@ void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
795
goto out;
796
797
if (current->active_mm == mm) {
798
+ unsigned long flags;
799
+
800
WARN_ON_ONCE(current->mm != NULL);
- /* Is a kernel thread and is using mm as the lazy tlb */
801
+ /*
802
+ * It is a kernel thread and is using mm as the lazy tlb, so
803
+ * switch it to init_mm. This is not always called from IPI
804
+ * (e.g., flush_type_needed), so must disable irqs.
805
+ */
806
+ local_irq_save(flags);
807
mmgrab_lazy_tlb(&init_mm);
808
current->active_mm = &init_mm;
809
switch_mm_irqs_off(mm, &init_mm, current);
810
mmdrop_lazy_tlb(mm);
811
+ local_irq_restore(flags);
812
}
813
814
/*
0 commit comments