Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e9671fcb3bef1fe2e71aa0456bd5b7eec9e8de4d
Commit:     e9671fcb3bef1fe2e71aa0456bd5b7eec9e8de4d
Parent:     03f49f345749abc08bc84b835433c94eea6e972b
Author:     Joe Perches <[EMAIL PROTECTED]>
AuthorDate: Sat Nov 10 21:36:04 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sat Nov 10 21:36:04 2007 -0800

    [NET]: Fix infinite loop in dev_mc_unsync().
    
    From: Joe Perches <[EMAIL PROTECTED]>
    
    Based upon an initial patch and report by Luis R. Rodriguez.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/dev_mcast.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c
index ae35405..647973d 100644
--- a/net/core/dev_mcast.c
+++ b/net/core/dev_mcast.c
@@ -168,13 +168,13 @@ 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)
-                       continue;
-               __dev_addr_delete(&to->mc_list, &to->mc_count,
-                                 da->da_addr, da->da_addrlen, 0);
-               da->da_synced = 0;
-               __dev_addr_delete(&from->mc_list, &from->mc_count,
-                                 da->da_addr, da->da_addrlen, 0);
+               if (da->da_synced) {
+                       __dev_addr_delete(&to->mc_list, &to->mc_count,
+                                         da->da_addr, da->da_addrlen, 0);
+                       da->da_synced = 0;
+                       __dev_addr_delete(&from->mc_list, &from->mc_count,
+                                         da->da_addr, da->da_addrlen, 0);
+               }
                da = next;
        }
        __dev_set_rx_mode(to);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to