summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2015-11-01 18:31:45 +0200
committerDavid S. Miller <davem@davemloft.net>2015-11-02 16:27:39 -0500
commiteca1e006cf6f6f66a1a90c055a8a6d393475c3f9 (patch)
tree5cec1e49982edac99b855872069ce06169e98b25 /net/bridge
parentb9b377136eb83cace5667cb6e8d53da771df6faa (diff)
downloadlinux-stable-eca1e006cf6f6f66a1a90c055a8a6d393475c3f9.tar.gz
linux-stable-eca1e006cf6f6f66a1a90c055a8a6d393475c3f9.tar.bz2
linux-stable-eca1e006cf6f6f66a1a90c055a8a6d393475c3f9.zip
bridge: vlan: Use rcu_dereference instead of rtnl_dereference
br_should_learn() is protected by RCU and not by RTNL, so use correct flavor of nbp_vlan_group(). Fixes: 907b1e6e83ed ("bridge: vlan: use proper rcu for the vlgrp member") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_vlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c
index dc1a2da55d09..1394da63614a 100644
--- a/net/bridge/br_vlan.c
+++ b/net/bridge/br_vlan.c
@@ -482,7 +482,7 @@ bool br_should_learn(struct net_bridge_port *p, struct sk_buff *skb, u16 *vid)
if (!br->vlan_enabled)
return true;
- vg = nbp_vlan_group(p);
+ vg = nbp_vlan_group_rcu(p);
if (!vg || !vg->num_vlans)
return false;