diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index f5f3b8a61bee..772aa011dad8 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -657,6 +657,11 @@ static void handle_stop_signal(int sig, struct task_struct *p) | |||
657 | } | 657 | } |
658 | } | 658 | } |
659 | 659 | ||
660 | static inline int legacy_queue(struct sigpending *signals, int sig) | ||
661 | { | ||
662 | return (sig < SIGRTMIN) && sigismember(&signals->signal, sig); | ||
663 | } | ||
664 | |||
660 | static int send_signal(int sig, struct siginfo *info, struct task_struct *t, | 665 | static int send_signal(int sig, struct siginfo *info, struct task_struct *t, |
661 | struct sigpending *signals) | 666 | struct sigpending *signals) |
662 | { | 667 | { |
@@ -721,9 +726,6 @@ out_set: | |||
721 | return 0; | 726 | return 0; |
722 | } | 727 | } |
723 | 728 | ||
724 | #define LEGACY_QUEUE(sigptr, sig) \ | ||
725 | (((sig) < SIGRTMIN) && sigismember(&(sigptr)->signal, (sig))) | ||
726 | |||
727 | int print_fatal_signals; | 729 | int print_fatal_signals; |
728 | 730 | ||
729 | static void print_fatal_signal(struct pt_regs *regs, int signr) | 731 | static void print_fatal_signal(struct pt_regs *regs, int signr) |
@@ -771,7 +773,7 @@ specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t) | |||
771 | /* Support queueing exactly one non-rt signal, so that we | 773 | /* Support queueing exactly one non-rt signal, so that we |
772 | can get more detailed information about the cause of | 774 | can get more detailed information about the cause of |
773 | the signal. */ | 775 | the signal. */ |
774 | if (LEGACY_QUEUE(&t->pending, sig)) | 776 | if (legacy_queue(&t->pending, sig)) |
775 | goto out; | 777 | goto out; |
776 | 778 | ||
777 | ret = send_signal(sig, info, t, &t->pending); | 779 | ret = send_signal(sig, info, t, &t->pending); |
@@ -932,7 +934,7 @@ __group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p) | |||
932 | if (sig_ignored(p, sig)) | 934 | if (sig_ignored(p, sig)) |
933 | return ret; | 935 | return ret; |
934 | 936 | ||
935 | if (LEGACY_QUEUE(&p->signal->shared_pending, sig)) | 937 | if (legacy_queue(&p->signal->shared_pending, sig)) |
936 | /* This is a non-RT signal and we already have one queued. */ | 938 | /* This is a non-RT signal and we already have one queued. */ |
937 | return ret; | 939 | return ret; |
938 | 940 | ||