From: Liam R. Howlett Date: Thu, 1 Oct 2020 14:03:48 +0000 (-0400) Subject: kernel/fork: Don't take spinlock of maple tree. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=528ee5dcc0289ee6abbc0d266f7dae3590e74a6e;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/kernel/fork.c b/kernel/fork.c index 09b77bb73bc16..35f13110e2edd 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);