netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix infinite loop on dev_mc_unsync()
@ 2007-11-09 15:11 Luis R. Rodriguez
  2007-11-09 18:51 ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2007-11-09 15:11 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Jeff Garzik

While reviewing net/core/dev_mcast.c I found what I think is an 
infinite loop on dev_mc_unsync(). This fixes it. We make use of
this guy on mac80211 in ieee80211_stop(). This is untested.

Signed-off-by: Luis R. Rodriguez <mcgrof-NvJAj8134tRxEa0u/P/EHDe48wsgrGvP@public.gmane.org>

diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index 15241cf..5373c03 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -168,8 +168,10 @@ void dev_mc_unsync(struct net_device *to, struct net_device *from)
 	da = from->mc_list;
 	while (da != NULL) {
 		next = da->next;
-		if (!da->da_synced)
+		if (!da->da_synced) {
+			da = next;
 			continue;
+		}
 		__dev_addr_delete(&to->mc_list, &to->mc_count,
 				  da->da_addr, da->da_addrlen, 0);
 		da->da_synced = 0;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-11  5:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 15:11 [PATCH] Fix infinite loop on dev_mc_unsync() Luis R. Rodriguez
2007-11-09 18:51 ` Luis R. Rodriguez
2007-11-09 19:07   ` Joe Perches
2007-11-09 19:21     ` Luis R. Rodriguez
2007-11-09 23:12       ` Patrick McHardy
     [not found]         ` <4734E962.3010603-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2007-11-10  0:08           ` Joe Perches
2007-11-10  0:13             ` Patrick McHardy
     [not found]               ` <4734F7B6.7060505-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2007-11-11  5:34                 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).