]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] fix OOM killing of swapoff
authorHugh Dickins <hugh@veritas.com>
Sat, 6 Jan 2007 00:37:03 +0000 (16:37 -0800)
committerChris Wright <chrisw@sous-sol.org>
Wed, 10 Jan 2007 19:05:23 +0000 (11:05 -0800)
commit85a181bb8fbaf93019651dbfa5034788b7164fa1
treeba405932115d1d52481773c6e238c174ebc7887a
parentdd2b609d2317fb243cc01eb984c91cc639a84d28
[PATCH] fix OOM killing of swapoff

These days, if you swapoff when there isn't enough memory, OOM killer gives
"BUG: scheduling while atomic" and the machine hangs: badness() needs to do
its PF_SWAPOFF return after the task_unlock (tasklist_lock is also held
here, so p isn't going to be freed: PF_SWAPOFF might get turned off at any
moment, but that doesn't really matter).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
mm/oom_kill.c