mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[PATCH] oom: kthread infinite loop fix
Skip kernel threads, rather than having them return 0 from badness. Theoretically, badness might truncate all results to 0, thus a kernel thread might be picked first, causing an infinite loop. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
af5b912435
commit
5081dde33f
1 changed files with 3 additions and 0 deletions
|
@ -207,6 +207,9 @@ static struct task_struct *select_bad_process(unsigned long *ppoints)
|
|||
unsigned long points;
|
||||
int releasing;
|
||||
|
||||
/* skip kernel threads */
|
||||
if (!p->mm)
|
||||
continue;
|
||||
/* skip the init task with pid == 1 */
|
||||
if (p->pid == 1)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue