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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 17 Feb 2008 02:57:25 +0300
From:	Andrey Borzenkov <arvidjaar@...l.ru>
To:	netdev@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	Laszlo Attila Toth <panther@...abit.hu>
Subject: [PATCH][2.6.25-rc2] Fix double lock in do_setlink introduced by 45b503548210fe6f23e92b856421c2a3f05fd034

[   58.097923] =============================================
[   58.098883] [ INFO: possible recursive locking detected ]
[   58.099603] 2.6.25-rc2-1avb #1
[   58.100013] ---------------------------------------------
[   58.100672] wpa_supplicant/2682 is trying to acquire lock:
[   58.100672]  (dev_base_lock){-.--}, at: [<c0278697>] do_setlink+0x327/0x3
[   58.100672]
[   58.100672] but task is already holding lock:
[   58.100672]  (dev_base_lock){-.--}, at: [<c0278680>] do_setlink+0x310/0x3

with final effect

[   58.537509] Kernel panic - not syncing: Aiee, killing interrupt handler!

Signed-off-by: Andrey Borzenkov <arvidjaar@...l.ru>

---

 net/core/rtnetlink.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index ecb02af..dd9e4da 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -853,7 +853,7 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
 		if (dev->link_mode != nla_get_u8(tb[IFLA_LINKMODE])) {
 			write_lock_bh(&dev_base_lock);
 			dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
-			write_lock_bh(&dev_base_lock);
+			write_unlock_bh(&dev_base_lock);
 			modified = 1;
 		}
 	}

Download attachment "signature.asc " of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists