Skip to content

Commit

Permalink
bridge: vlan: Use rcu_dereference instead of rtnl_dereference
Browse files Browse the repository at this point in the history
br_should_learn() is protected by RCU and not by RTNL, so use correct
flavor of nbp_vlan_group().

Fixes: 907b1e6 ("bridge: vlan: use proper rcu for the vlgrp
member")
Signed-off-by: Ido Schimmel <[email protected]>
Acked-by: Nikolay Aleksandrov <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Nov 2, 2015
1 parent b9b3771 commit eca1e00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit eca1e00

Please sign in to comment.