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:	Sat, 29 Dec 2012 15:31:01 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	netdev@...r.kernel.org, edumazet@...gle.com,
	bhutchings@...arflare.com, faisal.latif@...el.com,
	shemminger@...tta.com, fbl@...hat.com, roland@...nel.org,
	sean.hefty@...el.com, hal.rosenstock@...il.com, fubar@...ibm.com,
	andy@...yhouse.net, divy@...lsio.com, jitendra.kalsaria@...gic.com,
	sony.chacko@...gic.com, linux-driver@...gic.com, kaber@...sh.net,
	ursula.braun@...ibm.com, blaschka@...ux.vnet.ibm.com,
	schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
	ebiederm@...ssion.com, joe@...ches.com, amwang@...hat.com,
	nhorman@...driver.com, john.r.fastabend@...el.com,
	pablo@...filter.org
Subject: Re: [patch net-next 01/15] net: introduce upper device lists

From: Jiri Pirko <jiri@...nulli.us>
Date: Sat, 29 Dec 2012 11:38:28 +0100

> +	/*
> +	 * To prevent loops, check if dev is not upper device to upper_dev.
> +	 */

Please use:

	/* To prevent loops, check if dev is not upper device to upper_dev.  */

> +/**
> + * netdev_upper_free_rcu - Frees a upper device list item via the RCU pointer
> + * @entry: the entry's RCU field
> + *
> + * This function is designed to be used as a callback to the call_rcu()
> + * function so that the memory allocated to the netdev upper device list item
> + * can be released safely.
> + */
> +static void netdev_upper_free_rcu(struct rcu_head *entry)
> +{
> +	struct netdev_upper *upper;
> +
> +	upper = container_of(entry, struct netdev_upper, rcu);
> +	kfree(upper);
> +}

Please use kfree_rcu().

Also, since __netdev_has_upper_dev() modifies &search_list inside
of the list traversal loop, I think you really need to use
list_for_each_entry_safe() even though you always append to the
tail of &search_list.
--
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