Commit 163566f6 authored by Oleg Nesterov's avatar Oleg Nesterov

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: default avatarSeiji Aguchi <saguchi@redhat.com>
Reviewed-by: default avatarSeiji Aguchi <seiji.aguchi@hds.com>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
parent 6c303d3a
...@@ -1591,7 +1591,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) ...@@ -1591,7 +1591,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
int sig = q->info.si_signo; int sig = q->info.si_signo;
struct sigpending *pending; struct sigpending *pending;
unsigned long flags; unsigned long flags;
int ret; int ret, result;
BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
...@@ -1600,6 +1600,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) ...@@ -1600,6 +1600,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
goto ret; goto ret;
ret = 1; /* the signal is ignored */ ret = 1; /* the signal is ignored */
result = TRACE_SIGNAL_IGNORED;
if (!prepare_signal(sig, t, 0)) if (!prepare_signal(sig, t, 0))
goto out; goto out;
...@@ -1611,6 +1612,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) ...@@ -1611,6 +1612,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
*/ */
BUG_ON(q->info.si_code != SI_TIMER); BUG_ON(q->info.si_code != SI_TIMER);
q->info.si_overrun++; q->info.si_overrun++;
result = TRACE_SIGNAL_ALREADY_PENDING;
goto out; goto out;
} }
q->info.si_overrun = 0; q->info.si_overrun = 0;
...@@ -1620,7 +1622,9 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) ...@@ -1620,7 +1622,9 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
list_add_tail(&q->list, &pending->list); list_add_tail(&q->list, &pending->list);
sigaddset(&pending->signal, sig); sigaddset(&pending->signal, sig);
complete_signal(sig, t, group); complete_signal(sig, t, group);
result = TRACE_SIGNAL_DELIVERED;
out: out:
trace_signal_generate(sig, &q->info, t, group, result);
unlock_task_sighand(t, &flags); unlock_task_sighand(t, &flags);
ret: ret:
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment