[PATCH] out_of_memory() locking fix
authorAndrew Morton <akpm@osdl.org>
Thu, 2 Mar 2006 10:54:28 +0000 (02:54 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Mar 2006 16:33:07 +0000 (08:33 -0800)
I seem to have lost this read_unlock().

While we're there, let's turn that interruptible sleep unto uninterruptible,
so we don't get a busywait if signal_pending().  (Again.  We seem to have a
habit of doing this).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/oom_kill.c

index c86c737d243311bfa140565885adf6bc74027524..78747afad6b0d6e2b2a2e0c08075e9911c8b85c6 100644 (file)
@@ -355,6 +355,7 @@ retry:
        }
 
 out:
+       read_unlock(&tasklist_lock);
        cpuset_unlock();
        if (mm)
                mmput(mm);
@@ -364,5 +365,5 @@ out:
         * retry to allocate memory unless "p" is current
         */
        if (!test_thread_flag(TIF_MEMDIE))
-               schedule_timeout_interruptible(1);
+               schedule_timeout_uninterruptible(1);
 }