]> Git Repo - linux.git/commit
oom: oom_kill doesn't kill vfork parent (or child)
authorKOSAKI Motohiro <[email protected]>
Tue, 22 Sep 2009 00:03:15 +0000 (17:03 -0700)
committerLinus Torvalds <[email protected]>
Tue, 22 Sep 2009 14:17:39 +0000 (07:17 -0700)
commit8c5cd6f3a1721085652da204d454af4f8b92eda2
tree3fcb6f4cd7e5981c2713f05340ec931574768cff
parent495789a51a91cb8c015d8d77fecbac1caf20b186
oom: oom_kill doesn't kill vfork parent (or child)

Current oom_kill doesn't only kill the victim process, but also kill all
thas shread the same mm.  it mean vfork parent will be killed.

This is definitely incorrect.  another process have another oom_adj.  we
shouldn't ignore their oom_adj (it might have OOM_DISABLE).

following caller hit the minefield.

===============================
        switch (constraint) {
        case CONSTRAINT_MEMORY_POLICY:
                oom_kill_process(current, gfp_mask, order, 0, NULL,
                                "No available memory (MPOL_BIND)");
                break;

Note: force_sig(SIGKILL) send SIGKILL to all thread in the process.
We don't need to care multi thread in here.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/oom_kill.c
This page took 0.052739 seconds and 4 git commands to generate.