Skip to content

Commit 60a6531

Browse files
idoschdavem330
authored andcommitted
team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
We can't be within an RCU read-side critical section when deleting VLANs, as underlying drivers might sleep during the hardware operation. Therefore, replace the RCU critical section with a mutex. This is consistent with team_vlan_rx_add_vid. Fixes: 3d249d4 ("net: introduce ethernet teaming device") Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 918f618 commit 60a6531

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/team/team.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,10 +1872,10 @@ static int team_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, u16 vid)
18721872
struct team *team = netdev_priv(dev);
18731873
struct team_port *port;
18741874

1875-
rcu_read_lock();
1876-
list_for_each_entry_rcu(port, &team->port_list, list)
1875+
mutex_lock(&team->lock);
1876+
list_for_each_entry(port, &team->port_list, list)
18771877
vlan_vid_del(port->dev, proto, vid);
1878-
rcu_read_unlock();
1878+
mutex_unlock(&team->lock);
18791879

18801880
return 0;
18811881
}

0 commit comments

Comments
 (0)