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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 23 Mar 2009 09:33:33 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Tom Zanussi <tzanussi@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frédéric Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH] tracing/filters: use list_for_each_entry_safe


* Li Zefan <lizf@...fujitsu.com> wrote:

> > -	list_for_each_safe(entry, tmp, &call->fields) {
> > -		field = list_entry(entry, struct ftrace_event_field, link);
> > +	list_for_each_entry_safe(field, next, &call->fields, link) {
> 
> Why we need _safe version ?

indeed the plain list_for_each_entry() variant would be fine, as the 
list is only walked, not modified:

> >  		if (!strcmp(field->name, name))
> >  			return field;
> >  	}

(I've applied this patch already as it was a step forward - so 
please enhance this in the next round of cleanups via a delta patch 
- thanks!)

	Ingo
--
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