Skip to content

Commit caaa212

Browse files
NikAleksandrovgregkh
authored andcommitted
net: bridge: mst: fix suspicious rcu usage in br_mst_set_state
[ Upstream commit 546ceb1 ] I converted br_mst_set_state to RCU to avoid a vlan use-after-free but forgot to change the vlan group dereference helper. Switch to vlan group RCU deref helper to fix the suspicious rcu usage warning. Fixes: 3a7c166 ("net: bridge: mst: fix vlan use-after-free") Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=9bbe2de1bc9d470eb5fe Signed-off-by: Nikolay Aleksandrov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 09f4337 commit caaa212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bridge/br_mst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int br_mst_set_state(struct net_bridge_port *p, u16 msti, u8 state,
102102
int err = 0;
103103

104104
rcu_read_lock();
105-
vg = nbp_vlan_group(p);
105+
vg = nbp_vlan_group_rcu(p);
106106
if (!vg)
107107
goto out;
108108

0 commit comments

Comments
 (0)