projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
972c4ea
)
[PATCH] oom_kill_task(): cleanup ->mm checks
author
Oleg Nesterov
<
[email protected]
>
Fri, 29 Sep 2006 09:01:13 +0000
(
02:01
-0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 29 Sep 2006 16:18:21 +0000
(09:18 -0700)
- It is not possible to have task->mm == &init_mm.
- task_lock() buys nothing for 'if (!p->mm)' check.
Signed-off-by: Oleg Nesterov <
[email protected]
>
Cc: Nick Piggin <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/oom_kill.c
patch
|
blob
|
history
diff --git
a/mm/oom_kill.c
b/mm/oom_kill.c
index 991bf0cf47780650f417b07778b5ae7d4ed9963a..a5493a3b4851282b879590f653ed9aae1b36b08a 100644
(file)
--- a/
mm/oom_kill.c
+++ b/
mm/oom_kill.c
@@
-260,14
+260,11
@@
static void __oom_kill_task(struct task_struct *p, const char *message)
return;
}
- task_lock(p);
- if (!p->mm || p->mm == &init_mm) {
+ if (!p->mm) {
WARN_ON(1);
printk(KERN_WARNING "tried to kill an mm-less task!\n");
- task_unlock(p);
return;
}
- task_unlock(p);
if (message) {
printk(KERN_ERR "%s: Killed process %d (%s).\n",
@@
-301,7
+298,7
@@
static int oom_kill_task(struct task_struct *p, const char *message)
* However, this is of no concern to us.
*/
- if (mm == NULL
|| mm == &init_mm
)
+ if (mm == NULL)
return 1;
__oom_kill_task(p, message);