diff options
author | Oleg Nesterov <oleg@redhat.com> | 2011-11-22 20:37:41 (GMT) |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-01-13 17:49:02 (GMT) |
commit | 163566f60bfe6a8176650155e2d98649b0dfabf8 (patch) | |
tree | 3c1c8de6abf5af1e3234fc09e2b2aae93ad2b267 /kernel/signal.c | |
parent | 6c303d3ab39f0dc69546f179c424ee1124f50906 (diff) | |
download | linux-163566f60bfe6a8176650155e2d98649b0dfabf8.tar.xz |
tracing: send_sigqueue() needs trace_signal_generate() too
Add trace_signal_generate() into send_sigqueue().
send_sigqueue() is very similar to __send_signal(), just it uses
the preallocated info. It should do the same wrt tracing.
Reported-by: Seiji Aguchi <saguchi@redhat.com>
Reviewed-by: Seiji Aguchi <seiji.aguchi@hds.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 1bd9e86..8511e39 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1591,7 +1591,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) int sig = q->info.si_signo; struct sigpending *pending; unsigned long flags; - int ret; + int ret, result; BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); @@ -1600,6 +1600,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) goto ret; ret = 1; /* the signal is ignored */ + result = TRACE_SIGNAL_IGNORED; if (!prepare_signal(sig, t, 0)) goto out; @@ -1611,6 +1612,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) */ BUG_ON(q->info.si_code != SI_TIMER); q->info.si_overrun++; + result = TRACE_SIGNAL_ALREADY_PENDING; goto out; } q->info.si_overrun = 0; @@ -1620,7 +1622,9 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) list_add_tail(&q->list, &pending->list); sigaddset(&pending->signal, sig); complete_signal(sig, t, group); + result = TRACE_SIGNAL_DELIVERED; out: + trace_signal_generate(sig, &q->info, t, group, result); unlock_task_sighand(t, &flags); ret: return ret; |