diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index fe08008133da..6b982f2cf524 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -28,7 +28,8 @@ | |||
28 | #include <linux/freezer.h> | 28 | #include <linux/freezer.h> |
29 | #include <linux/pid_namespace.h> | 29 | #include <linux/pid_namespace.h> |
30 | #include <linux/nsproxy.h> | 30 | #include <linux/nsproxy.h> |
31 | #include <trace/events/sched.h> | 31 | #define CREATE_TRACE_POINTS |
32 | #include <trace/events/signal.h> | ||
32 | 33 | ||
33 | #include <asm/param.h> | 34 | #include <asm/param.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -856,7 +857,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
856 | struct sigqueue *q; | 857 | struct sigqueue *q; |
857 | int override_rlimit; | 858 | int override_rlimit; |
858 | 859 | ||
859 | trace_sched_signal_send(sig, t); | 860 | trace_signal_generate(sig, info, t); |
860 | 861 | ||
861 | assert_spin_locked(&t->sighand->siglock); | 862 | assert_spin_locked(&t->sighand->siglock); |
862 | 863 | ||
@@ -918,12 +919,21 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
918 | break; | 919 | break; |
919 | } | 920 | } |
920 | } else if (!is_si_special(info)) { | 921 | } else if (!is_si_special(info)) { |
921 | if (sig >= SIGRTMIN && info->si_code != SI_USER) | 922 | if (sig >= SIGRTMIN && info->si_code != SI_USER) { |
922 | /* | 923 | /* |
923 | * Queue overflow, abort. We may abort if the signal was rt | 924 | * Queue overflow, abort. We may abort if the |
924 | * and sent by user using something other than kill(). | 925 | * signal was rt and sent by user using something |
925 | */ | 926 | * other than kill(). |
927 | */ | ||
928 | trace_signal_overflow_fail(sig, group, info); | ||
926 | return -EAGAIN; | 929 | return -EAGAIN; |
930 | } else { | ||
931 | /* | ||
932 | * This is a silent loss of information. We still | ||
933 | * send the signal, but the *info bits are lost. | ||
934 | */ | ||
935 | trace_signal_lose_info(sig, group, info); | ||
936 | } | ||
927 | } | 937 | } |
928 | 938 | ||
929 | out_set: | 939 | out_set: |
@@ -1859,6 +1869,9 @@ relock: | |||
1859 | ka = &sighand->action[signr-1]; | 1869 | ka = &sighand->action[signr-1]; |
1860 | } | 1870 | } |
1861 | 1871 | ||
1872 | /* Trace actually delivered signals. */ | ||
1873 | trace_signal_deliver(signr, info, ka); | ||
1874 | |||
1862 | if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */ | 1875 | if (ka->sa.sa_handler == SIG_IGN) /* Do nothing. */ |
1863 | continue; | 1876 | continue; |
1864 | if (ka->sa.sa_handler != SIG_DFL) { | 1877 | if (ka->sa.sa_handler != SIG_DFL) { |