Skip to content

Commit

Permalink
tracing: Fix null pointer deref with SEND_SIG_FORCED
Browse files Browse the repository at this point in the history
BUG: unable to handle kernel NULL pointer dereference at
	0000000000000006
IP: [<ffffffff8107bd37>] ftrace_raw_event_signal_generate+0x87/0x140

TP_STORE_SIGINFO() forgets about SEND_SIG_FORCED, fix.

We should probably export is_si_special() and change TP_STORE_SIGINFO()
to use it in the longer term.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: 2.6.33.x-2.6.34.x <stable@kernel.org>
LKML-Reference: <20100603213409.GA8307@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Oleg Nesterov authored and Frederic Weisbecker committed Jun 8, 2010
1 parent 58cc1a9 commit b9b76df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/trace/events/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

#define TP_STORE_SIGINFO(__entry, info) \
do { \
if (info == SEND_SIG_NOINFO) { \
if (info == SEND_SIG_NOINFO || \
info == SEND_SIG_FORCED) { \
__entry->errno = 0; \
__entry->code = SI_USER; \
} else if (info == SEND_SIG_PRIV) { \
Expand Down

0 comments on commit b9b76df

Please sign in to comment.