diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 792952381092..2124ffadcfde 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -909,8 +909,7 @@ __group_complete_signal(int sig, struct task_struct *p) | |||
909 | do { | 909 | do { |
910 | sigaddset(&t->pending.signal, SIGKILL); | 910 | sigaddset(&t->pending.signal, SIGKILL); |
911 | signal_wake_up(t, 1); | 911 | signal_wake_up(t, 1); |
912 | t = next_thread(t); | 912 | } while_each_thread(p, t); |
913 | } while (t != p); | ||
914 | return; | 913 | return; |
915 | } | 914 | } |
916 | 915 | ||
@@ -928,13 +927,11 @@ __group_complete_signal(int sig, struct task_struct *p) | |||
928 | rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending); | 927 | rm_from_queue(SIG_KERNEL_STOP_MASK, &p->signal->shared_pending); |
929 | p->signal->group_stop_count = 0; | 928 | p->signal->group_stop_count = 0; |
930 | p->signal->group_exit_task = t; | 929 | p->signal->group_exit_task = t; |
931 | t = p; | 930 | p = t; |
932 | do { | 931 | do { |
933 | p->signal->group_stop_count++; | 932 | p->signal->group_stop_count++; |
934 | signal_wake_up(t, 0); | 933 | signal_wake_up(t, t == p); |
935 | t = next_thread(t); | 934 | } while_each_thread(p, t); |
936 | } while (t != p); | ||
937 | wake_up_process(p->signal->group_exit_task); | ||
938 | return; | 935 | return; |
939 | } | 936 | } |
940 | 937 | ||
@@ -985,9 +982,6 @@ void zap_other_threads(struct task_struct *p) | |||
985 | p->signal->flags = SIGNAL_GROUP_EXIT; | 982 | p->signal->flags = SIGNAL_GROUP_EXIT; |
986 | p->signal->group_stop_count = 0; | 983 | p->signal->group_stop_count = 0; |
987 | 984 | ||
988 | if (thread_group_empty(p)) | ||
989 | return; | ||
990 | |||
991 | for (t = next_thread(p); t != p; t = next_thread(t)) { | 985 | for (t = next_thread(p); t != p; t = next_thread(t)) { |
992 | /* | 986 | /* |
993 | * Don't bother with already dead threads | 987 | * Don't bother with already dead threads |
@@ -2300,15 +2294,6 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) | |||
2300 | k = ¤t->sighand->action[sig-1]; | 2294 | k = ¤t->sighand->action[sig-1]; |
2301 | 2295 | ||
2302 | spin_lock_irq(¤t->sighand->siglock); | 2296 | spin_lock_irq(¤t->sighand->siglock); |
2303 | if (signal_pending(current)) { | ||
2304 | /* | ||
2305 | * If there might be a fatal signal pending on multiple | ||
2306 | * threads, make sure we take it before changing the action. | ||
2307 | */ | ||
2308 | spin_unlock_irq(¤t->sighand->siglock); | ||
2309 | return -ERESTARTNOINTR; | ||
2310 | } | ||
2311 | |||
2312 | if (oact) | 2297 | if (oact) |
2313 | *oact = *k; | 2298 | *oact = *k; |
2314 | 2299 | ||
@@ -2335,7 +2320,6 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) | |||
2335 | rm_from_queue_full(&mask, &t->signal->shared_pending); | 2320 | rm_from_queue_full(&mask, &t->signal->shared_pending); |
2336 | do { | 2321 | do { |
2337 | rm_from_queue_full(&mask, &t->pending); | 2322 | rm_from_queue_full(&mask, &t->pending); |
2338 | recalc_sigpending_and_wake(t); | ||
2339 | t = next_thread(t); | 2323 | t = next_thread(t); |
2340 | } while (t != current); | 2324 | } while (t != current); |
2341 | } | 2325 | } |