From 528ee5dcc0289ee6abbc0d266f7dae3590e74a6e 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 09b77bb73bc1..35f13110e2ed 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