aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h2
-rw-r--r--kernel/signal.c17
2 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4f31a166b1a1..a95a2455cebe 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2036,7 +2036,7 @@ extern int do_notify_parent(struct task_struct *, int);
2036extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); 2036extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent);
2037extern void force_sig(int, struct task_struct *); 2037extern void force_sig(int, struct task_struct *);
2038extern int send_sig(int, struct task_struct *, int); 2038extern int send_sig(int, struct task_struct *, int);
2039extern void zap_other_threads(struct task_struct *p); 2039extern int zap_other_threads(struct task_struct *p);
2040extern struct sigqueue *sigqueue_alloc(void); 2040extern struct sigqueue *sigqueue_alloc(void);
2041extern void sigqueue_free(struct sigqueue *); 2041extern void sigqueue_free(struct sigqueue *);
2042extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); 2042extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
diff --git a/kernel/signal.c b/kernel/signal.c
index 2ee9573ed11f..906ae5a1779c 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1085,23 +1085,24 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
1085/* 1085/*
1086 * Nuke all other threads in the group. 1086 * Nuke all other threads in the group.
1087 */ 1087 */
1088void zap_other_threads(struct task_struct *p) 1088int zap_other_threads(struct task_struct *p)
1089{ 1089{
1090 struct task_struct *t; 1090 struct task_struct *t = p;
1091 int count = 0;
1091 1092
1092 p->signal->group_stop_count = 0; 1093 p->signal->group_stop_count = 0;
1093 1094
1094 for (t = next_thread(p); t != p; t = next_thread(t)) { 1095 while_each_thread(p, t) {
1095 /* 1096 count++;
1096 * Don't bother with already dead threads 1097
1097 */ 1098 /* Don't bother with already dead threads */
1098 if (t->exit_state) 1099 if (t->exit_state)
1099 continue; 1100 continue;
1100
1101 /* SIGKILL will be handled before any pending SIGSTOP */
1102 sigaddset(&t->pending.signal, SIGKILL); 1101 sigaddset(&t->pending.signal, SIGKILL);
1103 signal_wake_up(t, 1); 1102 signal_wake_up(t, 1);
1104 } 1103 }
1104
1105 return count;
1105} 1106}
1106 1107
1107struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags) 1108struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags)