MIPS: Drop mmap_sem in pagefault oom path
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 3 Jul 2009 16:33:09 +0000 (01:33 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 3 Aug 2009 16:52:40 +0000 (17:52 +0100)
Fix the pagefault oom path which does not drop mm->mmap_sem.
This was introduced by commit c7c1e3846bac1e4b8a8941f6a194812e28b0a519

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/fault.c

index 6751ce9ede9ed6ff6935ec058e86d5f47b992730..f956ecbb81363af8a55b4d0179e7b3b9abc50ca8 100644 (file)
@@ -171,6 +171,7 @@ out_of_memory:
         * We ran out of memory, call the OOM killer, and return the userspace
         * (which will retry the fault, or kill us if we got oom-killed).
         */
+       up_read(&mm->mmap_sem);
        pagefault_out_of_memory();
        return;