lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Sep 2009 10:17:10 -0400
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	rostedt@...dmis.org
CC:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	lkml <linux-kernel@...r.kernel.org>,
	systemtap <systemtap@...rces.redhat.com>,
	DLE <dle-develop@...ts.sourceforge.net>,
	Jim Keniston <jkenisto@...ibm.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Christoph Hellwig <hch@...radead.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Jason Baron <jbaron@...hat.com>,
	"K.Prasad" <prasad@...ux.vnet.ibm.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Li Zefan <lizf@...fujitsu.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCH tracing/kprobes 2/6] ftrace: Fix trace_add_event_call()
 to initialize list

Steven Rostedt wrote:
> On Mon, 2009-09-14 at 16:49 -0400, Masami Hiramatsu wrote:
>> Initialize event_call.list and handle failuer path in trace_add_event_call()
>> for fixing 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@...hat.com>
>> Cc: Jim Keniston <jkenisto@...ibm.com>
>> Cc: Ananth N Mavinakayanahalli <ananth@...ibm.com>
>> Cc: Andi Kleen <ak@...ux.intel.com>
>> Cc: Christoph Hellwig <hch@...radead.org>
>> Cc: Frank Ch. Eigler <fche@...hat.com>
>> Cc: Frederic Weisbecker <fweisbec@...il.com>
>> Cc: H. Peter Anvin <hpa@...or.com>
>> Cc: Ingo Molnar <mingo@...e.hu>
>> Cc: Jason Baron <jbaron@...hat.com>
>> Cc: K.Prasad <prasad@...ux.vnet.ibm.com>
>> Cc: Lai Jiangshan <laijs@...fujitsu.com>
>> Cc: Li Zefan <lizf@...fujitsu.com>
>> Cc: Peter Zijlstra <peterz@...radead.org>
>> Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
>> Cc: Steven Rostedt <rostedt@...dmis.org>
>> Cc: Tom Zanussi <tzanussi@...il.com>
>> ---
>>
>>  kernel/trace/trace_events.c |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
>> index ba34920..38e82a5 100644
>> --- a/kernel/trace/trace_events.c
>> +++ b/kernel/trace/trace_events.c
>> @@ -1009,10 +1009,14 @@ static int __trace_add_event_call(struct ftrace_event_call *call)
>>  	if (!d_events)
>>  		return -ENOENT;
>>  
>> +	INIT_LIST_HEAD(&call->list);
> 
> The INIT_LIST_HEAD is not needed here. The list_add will assign it.

Without initializing it, list debugging code warns always :-)
Please see, __list_add()@lib/list_debug.c

Thank you,


-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@...hat.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ