aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 24ee53b7f60c..6610a95506b3 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -377,7 +377,7 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
377 */ 377 */
378int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) 378int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
379{ 379{
380 int signr = 0; 380 int signr;
381 381
382 /* We only dequeue private signals from ourselves, we don't let 382 /* We only dequeue private signals from ourselves, we don't let
383 * signalfd steal them 383 * signalfd steal them
@@ -410,8 +410,12 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
410 } 410 }
411 } 411 }
412 } 412 }
413
413 recalc_sigpending(); 414 recalc_sigpending();
414 if (signr && unlikely(sig_kernel_stop(signr))) { 415 if (!signr)
416 return 0;
417
418 if (unlikely(sig_kernel_stop(signr))) {
415 /* 419 /*
416 * Set a marker that we have dequeued a stop signal. Our 420 * Set a marker that we have dequeued a stop signal. Our
417 * caller might release the siglock and then the pending 421 * caller might release the siglock and then the pending
@@ -427,9 +431,7 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
427 if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) 431 if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT))
428 tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; 432 tsk->signal->flags |= SIGNAL_STOP_DEQUEUED;
429 } 433 }
430 if (signr && 434 if ((info->si_code & __SI_MASK) == __SI_TIMER && info->si_sys_private) {
431 ((info->si_code & __SI_MASK) == __SI_TIMER) &&
432 info->si_sys_private) {
433 /* 435 /*
434 * Release the siglock to ensure proper locking order 436 * Release the siglock to ensure proper locking order
435 * of timer locks outside of siglocks. Note, we leave 437 * of timer locks outside of siglocks. Note, we leave