From 4bbf679b9f885512e1d8e891240bc9f1952806cf Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Thu, 1 Oct 2020 10:03:48 -0400 Subject: [PATCH] kernel/fork: Don't take spinlock of maple tree. You cannot take the spinlock of the maple tree and then allocate VMAs. Signed-off-by: Liam R. Howlett --- kernel/fork.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/fork.c b/kernel/fork.c index 966bc88d344f1..8b0631aa70c83 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -510,7 +510,6 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, if (retval) goto fail_nomem; - mas_lock(&old_mas); mas_for_each(&old_mas, mpnt, ULONG_MAX) { struct file *file; @@ -607,7 +606,6 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, /* a new mm has just been created */ retval = arch_dup_mmap(oldmm, mm); loop_out: - mas_unlock(&old_mas); out: mmap_write_unlock(mm); flush_tlb_mm(oldmm); -- 2.50.1