Re: [syzbot] Re: [syzbot] [net?] possible deadlock in team_device_event (3)
From: syzbot
Date: Wed Jul 31 2024 - 10:17:07 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: Re: [syzbot] [net?] possible deadlock in team_device_event (3)
Author: aha310510@xxxxxxxxx
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
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);
--