diff options
author | Tejun Heo <tj@kernel.org> | 2011-06-02 05:14:00 -0400 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2011-06-04 12:17:11 -0400 |
commit | dd1d6772692316fe35094085c5e4d9a370ad3462 (patch) | |
tree | d6f2743d96b93ded07d35a0af2cafa6056bfdc74 /kernel/signal.c | |
parent | 62c124ff3bcdb414af635c2bf822c9e4f2a5abfa (diff) |
signal: remove three noop tracehooks
Remove the following three noop tracehooks in signals.c.
* tracehook_force_sigpending()
* tracehook_get_signal()
* tracehook_finish_jctl()
The code area is about to be updated and these hooks don't do anything
other than obfuscating the logic.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 172a4c79f12c..c99b8b5c0be7 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -150,9 +150,7 @@ void recalc_sigpending_and_wake(struct task_struct *t) | |||
150 | 150 | ||
151 | void recalc_sigpending(void) | 151 | void recalc_sigpending(void) |
152 | { | 152 | { |
153 | if (unlikely(tracehook_force_sigpending())) | 153 | if (!recalc_sigpending_tsk(current) && !freezing(current)) |
154 | set_thread_flag(TIF_SIGPENDING); | ||
155 | else if (!recalc_sigpending_tsk(current) && !freezing(current)) | ||
156 | clear_thread_flag(TIF_SIGPENDING); | 154 | clear_thread_flag(TIF_SIGPENDING); |
157 | 155 | ||
158 | } | 156 | } |
@@ -2005,8 +2003,6 @@ retry: | |||
2005 | 2003 | ||
2006 | spin_unlock_irq(¤t->sighand->siglock); | 2004 | spin_unlock_irq(¤t->sighand->siglock); |
2007 | 2005 | ||
2008 | tracehook_finish_jctl(); | ||
2009 | |||
2010 | return 1; | 2006 | return 1; |
2011 | } | 2007 | } |
2012 | 2008 | ||
@@ -2109,37 +2105,25 @@ relock: | |||
2109 | 2105 | ||
2110 | for (;;) { | 2106 | for (;;) { |
2111 | struct k_sigaction *ka; | 2107 | struct k_sigaction *ka; |
2112 | /* | 2108 | |
2113 | * Tracing can induce an artificial signal and choose sigaction. | 2109 | if (unlikely(current->jobctl & JOBCTL_STOP_PENDING) && |
2114 | * The return value in @signr determines the default action, | 2110 | do_signal_stop(0)) |
2115 | * but @info->si_signo is the signal number we will report. | ||
2116 | */ | ||
2117 | signr = tracehook_get_signal(current, regs, info, return_ka); | ||
2118 | if (unlikely(signr < 0)) | ||
2119 | goto relock; | 2111 | goto relock; |
2120 | if (unlikely(signr != 0)) | ||
2121 | ka = return_ka; | ||
2122 | else { | ||
2123 | if (unlikely(current->jobctl & JOBCTL_STOP_PENDING) && | ||
2124 | do_signal_stop(0)) | ||
2125 | goto relock; | ||
2126 | 2112 | ||
2127 | signr = dequeue_signal(current, ¤t->blocked, | 2113 | signr = dequeue_signal(current, ¤t->blocked, info); |
2128 | info); | ||
2129 | 2114 | ||
2130 | if (!signr) | 2115 | if (!signr) |
2131 | break; /* will return 0 */ | 2116 | break; /* will return 0 */ |
2132 | 2117 | ||
2133 | if (signr != SIGKILL) { | 2118 | if (signr != SIGKILL) { |
2134 | signr = ptrace_signal(signr, info, | 2119 | signr = ptrace_signal(signr, info, |
2135 | regs, cookie); | 2120 | regs, cookie); |
2136 | if (!signr) | 2121 | if (!signr) |
2137 | continue; | 2122 | continue; |
2138 | } | ||
2139 | |||
2140 | ka = &sighand->action[signr-1]; | ||
2141 | } | 2123 | } |
2142 | 2124 | ||
2125 | ka = &sighand->action[signr-1]; | ||
2126 | |||
2143 | /* Trace actually delivered signals. */ | 2127 | /* Trace actually delivered signals. */ |
2144 | trace_signal_deliver(signr, info, ka); | 2128 | trace_signal_deliver(signr, info, ka); |
2145 | 2129 | ||