aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index b278b8d60eee..3791edfffeeb 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
176 struct zone **z; 176 struct zone **z;
177 nodemask_t nodes; 177 nodemask_t nodes;
178 int node; 178 int node;
179
180 nodes_clear(nodes);
179 /* node has memory ? */ 181 /* node has memory ? */
180 for_each_online_node(node) 182 for_each_online_node(node)
181 if (NODE_DATA(node)->node_present_pages) 183 if (NODE_DATA(node)->node_present_pages)
@@ -320,7 +322,7 @@ static int oom_kill_task(struct task_struct *p)
320 * Don't kill the process if any threads are set to OOM_DISABLE 322 * Don't kill the process if any threads are set to OOM_DISABLE
321 */ 323 */
322 do_each_thread(g, q) { 324 do_each_thread(g, q) {
323 if (q->mm == mm && p->oomkilladj == OOM_DISABLE) 325 if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
324 return 1; 326 return 1;
325 } while_each_thread(g, q); 327 } while_each_thread(g, q);
326 328
@@ -333,7 +335,7 @@ static int oom_kill_task(struct task_struct *p)
333 */ 335 */
334 do_each_thread(g, q) { 336 do_each_thread(g, q) {
335 if (q->mm == mm && q->tgid != p->tgid) 337 if (q->mm == mm && q->tgid != p->tgid)
336 force_sig(SIGKILL, p); 338 force_sig(SIGKILL, q);
337 } while_each_thread(g, q); 339 } while_each_thread(g, q);
338 340
339 return 0; 341 return 0;