From: Andrey Borzenkov <arvidjaar@mail.ru>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Laszlo Attila Toth <panther@balabit.hu>
Subject: [PATCH][2.6.25-rc2] Fix double lock in do_setlink introduced by 45b503548210fe6f23e92b856421c2a3f05fd034
Date: Sun, 17 Feb 2008 02:57:25 +0300 [thread overview]
Message-ID: <200802170257.26406.arvidjaar@mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
[ 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@mail.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;
}
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
reply other threads:[~2008-02-16 23:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802170257.26406.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=panther@balabit.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).