aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2011-11-22 15:37:41 -0500
committerOleg Nesterov <oleg@redhat.com>2012-01-13 12:49:02 -0500
commit163566f60bfe6a8176650155e2d98649b0dfabf8 (patch)
tree3c1c8de6abf5af1e3234fc09e2b2aae93ad2b267 /kernel/signal.c
parent6c303d3ab39f0dc69546f179c424ee1124f50906 (diff)
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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 1bd9e86fda1f..8511e39813c7 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)
1591 int sig = q->info.si_signo; 1591 int sig = q->info.si_signo;
1592 struct sigpending *pending; 1592 struct sigpending *pending;
1593 unsigned long flags; 1593 unsigned long flags;
1594 int ret; 1594 int ret, result;
1595 1595
1596 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); 1596 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
1597 1597
@@ -1600,6 +1600,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1600 goto ret; 1600 goto ret;
1601 1601
1602 ret = 1; /* the signal is ignored */ 1602 ret = 1; /* the signal is ignored */
1603 result = TRACE_SIGNAL_IGNORED;
1603 if (!prepare_signal(sig, t, 0)) 1604 if (!prepare_signal(sig, t, 0))
1604 goto out; 1605 goto out;
1605 1606
@@ -1611,6 +1612,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1611 */ 1612 */
1612 BUG_ON(q->info.si_code != SI_TIMER); 1613 BUG_ON(q->info.si_code != SI_TIMER);
1613 q->info.si_overrun++; 1614 q->info.si_overrun++;
1615 result = TRACE_SIGNAL_ALREADY_PENDING;
1614 goto out; 1616 goto out;
1615 } 1617 }
1616 q->info.si_overrun = 0; 1618 q->info.si_overrun = 0;
@@ -1620,7 +1622,9 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1620 list_add_tail(&q->list, &pending->list); 1622 list_add_tail(&q->list, &pending->list);
1621 sigaddset(&pending->signal, sig); 1623 sigaddset(&pending->signal, sig);
1622 complete_signal(sig, t, group); 1624 complete_signal(sig, t, group);
1625 result = TRACE_SIGNAL_DELIVERED;
1623out: 1626out:
1627 trace_signal_generate(sig, &q->info, t, group, result);
1624 unlock_task_sighand(t, &flags); 1628 unlock_task_sighand(t, &flags);
1625ret: 1629ret:
1626 return ret; 1630 return ret;