Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 140ffcec authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[PATCH] out_of_memory() locking fix



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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b1e2d907
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}