From: Ido Schimmel Date: Sun, 1 Nov 2015 16:31:45 +0000 (+0200) Subject: bridge: vlan: Use rcu_dereference instead of rtnl_dereference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eca1e006cf6f6f66a1a90c055a8a6d393475c3f9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Nikolay Aleksandrov Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- 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;