diff options
-rw-r--r-- | kernel/signal.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 06214b55dc5e..707736e64e0e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2200,8 +2200,8 @@ relock: | |||
2200 | 2200 | ||
2201 | /* | 2201 | /* |
2202 | * It could be that complete_signal() picked us to notify about the | 2202 | * It could be that complete_signal() picked us to notify about the |
2203 | * group-wide signal. Another thread should be notified now to take | 2203 | * group-wide signal. Other threads should be notified now to take |
2204 | * the signal since we will not. | 2204 | * the shared signals in @which since we will not. |
2205 | */ | 2205 | */ |
2206 | static void retarget_shared_pending(struct task_struct *tsk, sigset_t *which) | 2206 | static void retarget_shared_pending(struct task_struct *tsk, sigset_t *which) |
2207 | { | 2207 | { |
@@ -2214,8 +2214,19 @@ static void retarget_shared_pending(struct task_struct *tsk, sigset_t *which) | |||
2214 | 2214 | ||
2215 | t = tsk; | 2215 | t = tsk; |
2216 | while_each_thread(tsk, t) { | 2216 | while_each_thread(tsk, t) { |
2217 | if (!signal_pending(t) && !(t->flags & PF_EXITING)) | 2217 | if (t->flags & PF_EXITING) |
2218 | recalc_sigpending_and_wake(t); | 2218 | continue; |
2219 | |||
2220 | if (!has_pending_signals(&retarget, &t->blocked)) | ||
2221 | continue; | ||
2222 | /* Remove the signals this thread can handle. */ | ||
2223 | sigandsets(&retarget, &retarget, &t->blocked); | ||
2224 | |||
2225 | if (!signal_pending(t)) | ||
2226 | signal_wake_up(t, 0); | ||
2227 | |||
2228 | if (sigisemptyset(&retarget)) | ||
2229 | break; | ||
2219 | } | 2230 | } |
2220 | } | 2231 | } |
2221 | 2232 | ||