Skip to contentSkip to conversation

TP_STORE_SIGINFO(SEND_SIG_FORCED) == OOPS

PATCH Applied Oleg Nesterov 3 participants 4 messages Jun 3, 2010 – Jun 9, 2010 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TP_STORE_SIGINFO(SEND_SIG_FORCED) == OOPS

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.

---

 include/trace/events/signal.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/trace/events/signal.h renamed from include/trace/events/signal.h~TP_STORE_SIGINFO +2 -1
@@ -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) {		\
#2 lore raw
In reply to Oleg Nesterov
Quoted 9 lines · Oleg Nesterov
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.

Queued, thanks!

#3 lore raw

[tip:perf/urgent] tracing: Fix null pointer deref with SEND_SIG_FORCED

In reply to Oleg Nesterov
Commit-ID:  b9b76dfaac6fa2c289ee8a005be637afd2da7e2f
Gitweb:     http://git.kernel.org/tip/b9b76dfaac6fa2c289ee8a005be637afd2da7e2f
Author:     Oleg Nesterov <[email protected]>
AuthorDate: Thu, 3 Jun 2010 23:34:09 +0200
Committer:  Frederic Weisbecker <[email protected]>
CommitDate: Tue, 8 Jun 2010 23:51:32 +0200

tracing: Fix null pointer deref with SEND_SIG_FORCED

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.

Cc Steven Rostedt <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Jason Baron <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc 2.6.33.x-2.6.34.x <[email protected]>

LKML-Reference: <[email protected]>

---
 include/trace/events/signal.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/trace/events/signal.h +2 -1
index 814566c..17df434 100644
@@ -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) {		\