diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:21 -0500 |
commit | c3fa27d1367fac63ac8533d6f20ea851d0d70a10 (patch) | |
tree | e7731554085e22b6b63411b1ebb401079f3e0bbb /kernel/signal.c | |
parent | 96fa2b508d2d3fe040cf4ef2fffb955f0a537ea1 (diff) | |
parent | d103d01e4b19f185d3c85f77402b605534c32e89 (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (470 commits)
x86: Fix comments of register/stack access functions
perf tools: Replace %m with %a in sscanf
hw-breakpoints: Keep track of user disabled breakpoints
tracing/syscalls: Make syscall events print callbacks static
tracing: Add DEFINE_EVENT(), DEFINE_SINGLE_EVENT() support to docbook
perf: Don't free perf_mmap_data until work has been done
perf_event: Fix compile error
perf tools: Fix _GNU_SOURCE macro related strndup() build error
trace_syscalls: Remove unused syscall_name_to_nr()
trace_syscalls: Simplify syscall profile
trace_syscalls: Remove duplicate init_enter_##sname()
trace_syscalls: Add syscall_nr field to struct syscall_metadata
trace_syscalls: Remove enter_id exit_id
trace_syscalls: Set event_enter_##sname->data to its metadata
trace_syscalls: Remove unused event_syscall_enter and event_syscall_exit
perf_event: Initialize data.period in perf_swevent_hrtimer()
perf probe: Simplify event naming
perf probe: Add --list option for listing current probe events
perf probe: Add argv_split() from lib/argv_split.c
perf probe: Move probe event utility functions to probe-event.c
...
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) { |