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, 17 Jun 2009 01:19:39 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Jiri Pirko <jpirko@...hat.com>
Cc:	Netdev <netdev@...r.kernel.org>,
	John Linville <linville@...driver.com>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	davem <davem@...emloft.net>
Subject: Re: [RFC] net: refactor multicast/unicast address list

On Wed, 2009-06-17 at 01:10 +0200, Johannes Berg wrote:

> I'd like to get this patch into the .32 tree once it opens
> http://johannes.sipsolutions.net/patches/kernel/all/LATEST/NNN-net-core-mc-sync-list.patch

+/**
+ * 	mc_unsync_from_dev - Remove synchronized addresses from the destination list
+ *	@to: destination list
+ *	@to_count: destination list count
+ *	@from: source device
+ *
+ * 	Remove all addresses that were added to the destination list by
+ * 	mc_sync_from_dev(). This function is intended to be called from
+ *	the * 	dev->stop function of layered software devices. The
+ *	destination list must be locked in whatever way the caller
+ *	manages it.
+ */
+void mc_unsync_from_dev(struct dev_addr_list **to, int *to_count,
+			struct net_device *from)
+{
+	netif_addr_lock_bh(from);
+	__dev_addr_unsync(to, to_count,
+			  &from->mc_list, &from->mc_count);
+	netif_addr_unlock_bh(from);
+}
+EXPORT_SYMBOL(mc_unsync_from_dev);

That can't work, of course, because the "to" list needs to be locked
_after_ "from" is locked, due mc_sync_from_dev() begin used in
ndo_set_multicast_list(). I guess I have to push out all the locking, by
just exporting __dev_addr_sync/__dev_addr_unsync.

Objections? Better ideas?

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ