Masami Hiramatsu
588bebb74f
ftrace: Fix trace_add_event_call() to initialize list
Handle failure path in trace_add_event_call() to fix the below bug
which occurred when I tried to add invalid event twice.
Could not create debugfs 'kmalloc' directory
Failed to register kprobe event: kmalloc
Faild to register probe event(-1)
------------[ cut here ]------------
WARNING: at /home/mhiramat/ksrc/random-tracing/lib/list_debug.c:26
__list_add+0x27/0x5c()
Hardware name:
list_add corruption. next->prev should be prev (c07d78cc), but was
00001000. (next=d854236c).
Modules linked in: sunrpc uinput virtio_net virtio_balloon i2c_piix4 pcspkr
i2c_core virtio_blk virtio_pci virtio_ring virtio [last unloaded:
scsi_wait_scan]
Pid: 1394, comm: tee Not tainted 2.6.31-rc9 #51
Call Trace:
[<c0438424>] warn_slowpath_common+0x65/0x7c
[<c05371b3>] ? __list_add+0x27/0x5c
[<c043846f>] warn_slowpath_fmt+0x24/0x27
[<c05371b3>] __list_add+0x27/0x5c
[<c047f050>] list_add+0xa/0xc
[<c047f8f5>] trace_add_event_call+0x60/0x97
[<c0483133>] command_trace_probe+0x42c/0x51b
[<c044a1b3>] ? remove_wait_queue+0x22/0x27
[<c042a9c0>] ? __wake_up+0x32/0x3b
[<c04832f6>] probes_write+0xd4/0x10a
[<c0483222>] ? probes_write+0x0/0x10a
[<c04b27a9>] vfs_write+0x80/0xdf
[<c04b289c>] sys_write+0x3b/0x5d
[<c0670d41>] syscall_call+0x7/0xb
---[ end trace 2b962b5dc1fdc07d ]---
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frank Ch. Eigler <fche@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jason Baron <jbaron@redhat.com>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <4AB1077F.6020107@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2009-09-17 04:03:46 +02:00
..
2009-09-06 06:11:42 +02:00
2009-09-06 06:11:42 +02:00
2009-09-11 01:09:23 +02:00
2009-09-04 12:12:39 -04:00
2009-08-27 02:31:54 +02:00
2009-06-17 17:01:09 -04:00
2009-09-04 19:42:22 -04:00
2009-09-04 18:59:39 -04:00
2009-05-07 11:17:34 +02:00
2009-03-22 18:16:54 +01:00
2009-08-06 06:26:09 +02:00
2009-08-27 02:32:28 +02:00
2009-09-04 23:22:33 +02:00
2009-09-17 04:03:46 +02:00
2009-09-11 01:09:23 +02:00
2009-09-04 18:59:39 -04:00
2009-07-18 12:20:01 +02:00
2009-05-07 13:36:22 +02:00
2009-09-04 18:44:22 -04:00
2009-09-17 04:03:40 +02:00
2009-09-04 18:59:39 -04:00
2009-03-23 09:22:15 +01:00
2009-07-02 08:51:13 +02:00
2009-06-09 17:29:07 -04:00
2009-09-04 18:59:39 -04:00
2009-07-23 10:07:17 -04:00
2009-09-04 18:59:39 -04:00
2009-09-04 18:44:22 -04:00
2008-05-23 21:13:23 +02:00
2009-08-06 07:28:06 +02:00
2009-08-17 11:25:09 +02:00
2009-08-17 11:25:09 +02:00
2009-07-10 12:14:05 +02:00
2009-09-11 01:09:23 +02:00
2009-06-15 10:06:19 -07:00
2009-07-10 12:14:07 +02:00
2009-09-06 06:11:42 +02:00
2009-09-11 01:09:23 +02:00