linux-mips
[Top] [All Lists]

[PATCH] mips: drop mmap_sem in pagefault oom path

To: linux-mips@linux-mips.org
Subject: [PATCH] mips: drop mmap_sem in pagefault oom path
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Sat, 4 Jul 2009 01:33:09 +0900
Cc: Ralf Baechle <ralf@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=cVvvJOL79N88fLDAaOfTiJGKfc0J56b2N+T5gu1fUxM=; b=DwNvfO/jf79v19bLTgXQaEvsyzm4GduelJoXOxNWPgMiG6ZS2bsfrWqvUC9MCxKWRb PM4DlBp7ont/iWmUSs64rwpTsG5tSALIjGKbnNygbr21ie710CDzZ6SeI4Nd1bd+WG/H D7Uir25GwzIGW6DeKOpcGyPnu/Mtw974LR0g0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=oGFBG5K1OaZ3B0RrW3MPsKsHWBYbrvCaUdzIYThKiiidsN71efuGxc1Pw/0Lki2KMr hMTtbB3ZzKR5rfI0kIO93gTZRcrU2gc8u5NGKxx0uGf8RvziONHob1HdfhVOThdqRYqC FJgJkoDwYfrMFHKm3pErHIu8XJTFbgcFwpzrE=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
Fix the pagefault oom path which does not drop mm->mmap_sem.
This was introduced by commit c7c1e3846bac1e4b8a8941f6a194812e28b0a519
(This is not compile tested)

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 arch/mips/mm/fault.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 6751ce9..f956ecb 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -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;
 
-- 
1.6.0.6


<Prev in Thread] Current Thread [Next in Thread>