lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <000000000000e5b2a9061e9c3dc2@google.com>
Date: Thu, 01 Aug 2024 02:57:42 -0700
From: syzbot <syzbot+b668da2bc4cb9670bf58@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [net?] possible deadlock in
 team_device_event (3)

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: Re: [syzbot] [net?] possible deadlock in team_device_event (3)
Author: aha310510@...il.com

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

---
 drivers/net/team/team_core.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
index ab1935a4aa2c..44c709015007 100644
--- a/drivers/net/team/team_core.c
+++ b/drivers/net/team/team_core.c
@@ -2946,10 +2946,22 @@ static void __team_port_change_port_removed(struct team_port *port)
 static void team_port_change_check(struct team_port *port, bool linkup)
 {
 	struct team *team = port->team;
+	bool flag = true;
 
-	mutex_lock(&team->lock);
+	if (mutex_is_locked(&team->lock)){
+		unsigned owner, curr = (unsigned long)current;
+		owner = atomic_long_read(&team->lock.owner);
+		if (owner != curr)
+			mutex_lock(&team->lock);
+		else
+			flag = false;
+	}
+	else{
+		mutex_lock(&team->lock);
+	}
 	__team_port_change_check(port, linkup);
-	mutex_unlock(&team->lock);
+	if (flag)
+		mutex_unlock(&team->lock);
 }
 
 
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ