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]
Message-ID: <488948A6.2050408@cn.fujitsu.com>
Date:	Fri, 25 Jul 2008 11:29:42 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Daniel Walker <dwalker@...sta.com>
CC:	Ranjit Manomohan <ranjitm@...gle.com>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	menage@...gle.com, kaber@...sh.net, akpm@...ux-foundation.org
Subject: Re: [PATCH 2/2[ Traffic control cgroups subsystem

Daniel Walker wrote:
> On Thu, 2008-07-24 at 16:37 -0700, Ranjit Manomohan wrote:
> 
> 
>> +/* Delete one filter entry */
>> +static int cgroup_delete(struct tcf_proto *tp, unsigned long arg)
>> +{
>> +	struct cgroup_head *head = (struct cgroup_head *) tp->root;
>> +	struct cgroup_filter *t, *f = (struct cgroup_filter *) arg;
>> +
>> +	list_for_each_entry(t, &head->flist, link)
>> +		if (t == f) {
>> +			tcf_tree_lock(tp);
>> +			list_del(&t->link);
> 
> Doesn't the above need to be a "_safe" list operation since your
> deleting the element?
> 

No. You don't need "_safe" if you break out the loop immediately
after list_del().

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ