Skip to content

Commit 1f8c5df

Browse files
committed
Merge tag 'core-urgent-2022-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull PASID fix from Thomas Gleixner: "A single bugfix for the PASID management code, which freed the PASID too early. The PASID needs to be tied to the mm lifetime, not to the address space lifetime" * tag 'core-urgent-2022-05-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: mm: Fix PASID use-after-free issue
2 parents 379c726 + 2667ed1 commit 1f8c5df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/fork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ void __mmdrop(struct mm_struct *mm)
792792
mmu_notifier_subscriptions_destroy(mm);
793793
check_mm(mm);
794794
put_user_ns(mm->user_ns);
795+
mm_pasid_drop(mm);
795796
free_mm(mm);
796797
}
797798
EXPORT_SYMBOL_GPL(__mmdrop);
@@ -1190,7 +1191,6 @@ static inline void __mmput(struct mm_struct *mm)
11901191
}
11911192
if (mm->binfmt)
11921193
module_put(mm->binfmt->module);
1193-
mm_pasid_drop(mm);
11941194
mmdrop(mm);
11951195
}
11961196

0 commit comments

Comments
 (0)