Re: [syzbot] Re: [syzbot] [net?] possible deadlock in team_device_event (3)

syzbot
2024-07-31T14:16:59Z

drivers/net/team/team_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
index ab1935a4aa2c..ee595c3c6624 100644
--- a/drivers/net/team/team_core.c
+++ b/drivers/net/team/team_core.c
@@ -1212,8 +1212,9 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
portname);
goto err_port_enter;
}
-
+ mutex_unlock(&team->lock);
err = dev_open(port_dev, extack);
+ mutex_lock(&team->lock);
if (err) {
netdev_dbg(dev, "Device %s opening failed\n",
portname);
--