]> Git Repo - linux.git/commitdiff
signal: oom_kill_task: use SEND_SIG_FORCED instead of force_sig()
authorOleg Nesterov <[email protected]>
Fri, 23 Mar 2012 22:02:45 +0000 (15:02 -0700)
committerLinus Torvalds <[email protected]>
Fri, 23 Mar 2012 23:58:41 +0000 (16:58 -0700)
Change oom_kill_task() to use do_send_sig_info(SEND_SIG_FORCED) instead
of force_sig(SIGKILL).  With the recent changes we do not need force_ to
kill the CLONE_NEWPID tasks.

And this is more correct.  force_sig() can race with the exiting thread
even if oom_kill_task() checks p->mm != NULL, while
do_send_sig_info(group => true) kille the whole process.

Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/oom_kill.c

index 4198e000f41a5c3162a7851ace0a307a71026626..46bf2ed5594c73a86cbbe61fec40669bcfea74a3 100644 (file)
@@ -521,11 +521,11 @@ static void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
                        pr_err("Kill process %d (%s) sharing same memory\n",
                                task_pid_nr(p), p->comm);
                        task_unlock(p);
-                       force_sig(SIGKILL, p);
+                       do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true);
                }
 
        set_tsk_thread_flag(victim, TIF_MEMDIE);
-       force_sig(SIGKILL, victim);
+       do_send_sig_info(SIGKILL, SEND_SIG_FORCED, victim, true);
 }
 #undef K
 
This page took 0.05679 seconds and 4 git commands to generate.