Commit 140ffcec4def3ee3af7565b2cf1d3b2580f7e180

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent b1e2d907cb

[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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -355,6 +355,7 @@
355 355 }
356 356  
357 357 out:
  358 + read_unlock(&tasklist_lock);
358 359 cpuset_unlock();
359 360 if (mm)
360 361 mmput(mm);
... ... @@ -364,6 +365,6 @@
364 365 * retry to allocate memory unless "p" is current
365 366 */
366 367 if (!test_thread_flag(TIF_MEMDIE))
367   - schedule_timeout_interruptible(1);
  368 + schedule_timeout_uninterruptible(1);
368 369 }