aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/exec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 80fe7bcfa094..a5c51646d1ad 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1371,17 +1371,24 @@ static void format_corename(char *corename, const char *pattern, long signr)
1371static void zap_process(struct task_struct *start, int *ptraced) 1371static void zap_process(struct task_struct *start, int *ptraced)
1372{ 1372{
1373 struct task_struct *t; 1373 struct task_struct *t;
1374 unsigned long flags;
1375
1376 spin_lock_irqsave(&start->sighand->siglock, flags);
1374 1377
1375 t = start; 1378 t = start;
1376 do { 1379 do {
1377 if (t != current && t->mm) { 1380 if (t != current && t->mm) {
1378 t->mm->core_waiters++; 1381 t->mm->core_waiters++;
1379 force_sig_specific(SIGKILL, t); 1382 sigaddset(&t->pending.signal, SIGKILL);
1383 signal_wake_up(t, 1);
1384
1380 if (unlikely(t->ptrace) && 1385 if (unlikely(t->ptrace) &&
1381 unlikely(t->parent->mm == t->mm)) 1386 unlikely(t->parent->mm == t->mm))
1382 *ptraced = 1; 1387 *ptraced = 1;
1383 } 1388 }
1384 } while ((t = next_thread(t)) != start); 1389 } while ((t = next_thread(t)) != start);
1390
1391 spin_unlock_irqrestore(&start->sighand->siglock, flags);
1385} 1392}
1386 1393
1387static void zap_threads (struct mm_struct *mm) 1394static void zap_threads (struct mm_struct *mm)