Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144648
b: refs/heads/master
c: 184101b
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed May 6, 2009
1 parent ac4a91a commit 3f073f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df3935ffd6166fdd00702cf548fb5bb55737758b
refs/heads/master: 184101bf143ac96d62b3dcc17e7b3550f98d3350
44 changes: 21 additions & 23 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,34 +514,32 @@ void clear_zonelist_oom(struct zonelist *zonelist, gfp_t gfp_mask)
*/
static void __out_of_memory(gfp_t gfp_mask, int order)
{
if (sysctl_oom_kill_allocating_task) {
oom_kill_process(current, gfp_mask, order, 0, NULL,
"Out of memory (oom_kill_allocating_task)");

} else {
unsigned long points;
struct task_struct *p;

retry:
/*
* Rambo mode: Shoot down a process and hope it solves whatever
* issues we may have.
*/
p = select_bad_process(&points, NULL);
struct task_struct *p;
unsigned long points;

if (PTR_ERR(p) == -1UL)
if (sysctl_oom_kill_allocating_task)
if (!oom_kill_process(current, gfp_mask, order, 0, NULL,
"Out of memory (oom_kill_allocating_task)"))
return;
retry:
/*
* Rambo mode: Shoot down a process and hope it solves whatever
* issues we may have.
*/
p = select_bad_process(&points, NULL);

/* Found nothing?!?! Either we hang forever, or we panic. */
if (!p) {
read_unlock(&tasklist_lock);
panic("Out of memory and no killable processes...\n");
}
if (PTR_ERR(p) == -1UL)
return;

if (oom_kill_process(p, gfp_mask, order, points, NULL,
"Out of memory"))
goto retry;
/* Found nothing?!?! Either we hang forever, or we panic. */
if (!p) {
read_unlock(&tasklist_lock);
panic("Out of memory and no killable processes...\n");
}

if (oom_kill_process(p, gfp_mask, order, points, NULL,
"Out of memory"))
goto retry;
}

/*
Expand Down

0 comments on commit 3f073f0

Please sign in to comment.