netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NET]: Messed multicast lists after dev_mc_sync/unsync
@ 2008-02-19 14:56 Patrick McHardy
  2008-02-19 22:17 ` David Miller
  2008-02-27 11:37 ` Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick McHardy @ 2008-02-19 14:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1058 bytes --]

commit 6548b91f39381b2c5f02f99c14734546354bff89
Author: Jorge Boncompte [DTI2] <jorge@dti2.net>
Date:   Mon Feb 18 16:02:01 2008 +0100

    [NET]: Messed multicast lists after dev_mc_sync/unsync
    
    Commit a0a400d79e3dd7843e7e81baa3ef2957bdc292d0 from you
    introduced a new field "da_synced" to struct dev_addr_list that is
    not properly initialized to 0. So when any of the current users (8021q,
    macvlan, mac80211) calls dev_mc_sync/unsync they mess the address
    list for both devices.
    
    The attached patch fixed it for me and avoid future problems.
    
    Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/net/core/dev.c b/net/core/dev.c
index 6cfc123..9516105 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2900,7 +2900,7 @@ int __dev_addr_add(struct dev_addr_list **list, int *count,
 		}
 	}
 
-	da = kmalloc(sizeof(*da), GFP_ATOMIC);
+	da = kzalloc(sizeof(*da), GFP_ATOMIC);
 	if (da == NULL)
 		return -ENOMEM;
 	memcpy(da->da_addr, addr, alen);

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

end of thread, other threads:[~2008-02-27 12:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 14:56 [NET]: Messed multicast lists after dev_mc_sync/unsync Patrick McHardy
2008-02-19 22:17 ` David Miller
2008-02-27  7:38   ` Pekka Savola
2008-02-27  7:52     ` David Miller
2008-02-27 11:37 ` Johannes Berg
2008-02-27 11:46   ` Patrick McHardy
2008-02-27 12:34     ` Johannes Berg
2008-02-27 12:42       ` Patrick McHardy
2008-02-27 12:46         ` Johannes Berg

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).