[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131120.153204.1811191418900565753.davem@davemloft.net>
Date: Wed, 20 Nov 2013 15:32:04 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: dingtianhong@...wei.com
Cc: stephen@...workplumber.org, bridge@...ts.linux-foundation.org,
netdev@...r.kernel.org, toshiaki.makita1@...il.com,
vyasevich@...il.com
Subject: Re: [PATCH net v2] bridge: flush br's address entry in fdb when
remove the bridge dev
From: Ding Tianhong <dingtianhong@...wei.com>
Date: Wed, 20 Nov 2013 09:58:02 +0800
> From 241ddeaad73c7ed9e376a4b0926e79bdc3df9f58 Mon Sep 17 00:00:00 2001
> From: Ding Tianhong <dingtianhong@...wei.com>
> Date: Sat, 7 Dec 2013 22:12:05 +0800
> Subject: [PATCH] bridge: flush br's address entry in fdb when remove the
> bridge dev
>
> When the following commands are executed:
>
> brctl addbr br0
> ifconfig br0 hw ether <addr>
> rmmod bridge
>
> The calltrace will occur:
...
> The reason is that when the bridge dev's address is changed, the
> br_fdb_change_mac_address() will add new address in fdb, but when
> the bridge was removed, the address entry in the fdb did not free,
> the bridge_fdb_cache still has objects when destroy the cache, Fix
> this by flushing the bridge address entry when removing the bridge.
>
> v2: according to the Toshiaki Makita and Vlad's suggestion, I only
> delete the vlan0 entry, it still have a leak here if the vlan id
> is other number, so I need to call fdb_delete_by_port(br, NULL, 1)
> to flush all entries whose dst is NULL for the bridge.
>
> Suggested-by: Toshiaki Makita <toshiaki.makita1@...il.com>
> Suggested-by: Vlad Yasevich <vyasevich@...il.com>
> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists