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, 23 Sep 2009 01:16:53 -0700
From:	Masami Hiramatsu <mhiramat@...hat.com>
To:	Li Zefan <lizf@...fujitsu.com>
CC:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	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>,
	Peter Zijlstra <peterz@...radead.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCH 19/24] ftrace: Fix trace_add_event_call() to initialize
 list

Li Zefan wrote:
>> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
>> index ba34920..83cc2c0 100644
>> --- a/kernel/trace/trace_events.c
>> +++ b/kernel/trace/trace_events.c
>> @@ -1010,9 +1010,12 @@ static int __trace_add_event_call(struct ftrace_event_call *call)
>>  		return -ENOENT;
>>  
>>  	list_add(&call->list, &ftrace_events);
>> -	return event_create_dir(call, d_events, &ftrace_event_id_fops,
>> +	ret = event_create_dir(call, d_events, &ftrace_event_id_fops,
>>  				&ftrace_enable_fops, &ftrace_event_filter_fops,
>>  				&ftrace_event_format_fops);
>> +	if (ret < 0)
>> +		list_del(&call->list);
>> +	return ret;
> 
> seems it's a bit better to call list_add() after event_create_dir()
> returns 0.

Sure, that's another way to do. But I'm afraid that will make a difference
from trace_module_add_events() path.

---
                call->mod = mod;
                list_add(&call->list, &ftrace_events);
                event_create_dir(call, d_events,
                                 &file_ops->id, &file_ops->enable,
                                 &file_ops->filter, &file_ops->format);
---
Anyway, this also needs to check the result of event_create_dir().

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