提交 140ffcec 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[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: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b1e2d907
...@@ -355,6 +355,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) ...@@ -355,6 +355,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
} }
out: out:
read_unlock(&tasklist_lock);
cpuset_unlock(); cpuset_unlock();
if (mm) if (mm)
mmput(mm); mmput(mm);
...@@ -364,5 +365,5 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order) ...@@ -364,5 +365,5 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
* retry to allocate memory unless "p" is current * retry to allocate memory unless "p" is current
*/ */
if (!test_thread_flag(TIF_MEMDIE)) if (!test_thread_flag(TIF_MEMDIE))
schedule_timeout_interruptible(1); schedule_timeout_uninterruptible(1);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册