All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix infinite loop on dev_mc_unsync()
@ 2007-11-09 15:11 ` Luis R. Rodriguez
  0 siblings, 0 replies; 15+ messages in thread
From: Luis R. Rodriguez @ 2007-11-09 15:11 UTC (permalink / raw)
  To: netdev; +Cc: linux-wireless, 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@winlab.rutgers.edu>

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] 15+ messages in thread

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

Thread overview: 15+ 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 15:11 ` Luis R. Rodriguez
2007-11-09 18:51 ` Luis R. Rodriguez
2007-11-09 18:51   ` Luis R. Rodriguez
2007-11-09 19:07   ` Joe Perches
2007-11-09 19:07     ` Joe Perches
2007-11-09 19:21     ` Luis R. Rodriguez
2007-11-09 19:21       ` Luis R. Rodriguez
2007-11-09 23:12       ` Patrick McHardy
2007-11-10  0:08         ` Joe Perches
2007-11-10  0:08           ` Joe Perches
2007-11-10  0:13           ` Patrick McHardy
2007-11-10  0:13             ` Patrick McHardy
2007-11-11  5:34             ` David Miller
2007-11-11  5:34               ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.