diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2015-10-02 15:05:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-04 16:43:47 -0700 |
commit | 586c2b573ee4c2c4ba03e16318a16614ebf876f8 (patch) | |
tree | 8b59c375f2861840765f7915987ecf9e15e85bdf /net/bridge/br_vlan.c | |
parent | e96f78ab2703f3b0d512f6b469bc685d2ef20475 (diff) | |
download | blackbird-obmc-linux-586c2b573ee4c2c4ba03e16318a16614ebf876f8.tar.gz blackbird-obmc-linux-586c2b573ee4c2c4ba03e16318a16614ebf876f8.zip |
bridge: vlan: use rcu list for the ordered vlan list
When I did the conversion to rhashtable I missed the required locking of
one important user of the vlan list - br_get_link_af_size_filtered()
which is called:
br_ifinfo_notify() -> br_nlmsg_size() -> br_get_link_af_size_filtered()
and the notifications can be sent without holding rtnl. Before this
conversion the function relied on using rcu and since we already use rcu to
destroy the vlans, we can simply migrate the list to use the rcu helpers.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_vlan.c')
-rw-r--r-- | net/bridge/br_vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 1a79e199ca3b..d97a55e97830 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -111,12 +111,12 @@ static void __vlan_add_list(struct net_bridge_vlan *v) else break; } - list_add(&v->vlist, hpos); + list_add_rcu(&v->vlist, hpos); } static void __vlan_del_list(struct net_bridge_vlan *v) { - list_del(&v->vlist); + list_del_rcu(&v->vlist); } static int __vlan_vid_del(struct net_device *dev, struct net_bridge *br, |