From: Chris Wright <chrisw@osdl.org>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: ralf@linux-mips.org, torvalds@osdl.org, akpm@osdl.org,
alan@lxorguk.ukuu.org.uk, jmforbes@linuxtx.org,
zwane@arm.linux.org.uk, cliffw@osdl.org, tytso@mit.edu,
rddunlap@osdl.org
Subject: [4/9] NetROM locking
Date: Wed, 16 Mar 2005 15:54:54 -0800 [thread overview]
Message-ID: <20050316235454.GC5389@shell0.pdx.osdl.net> (raw)
In-Reply-To: <20050316235336.GY5389@shell0.pdx.osdl.net>
-stable review patch. If anyone has any objections, please let us know.
----
From: Ralf Baechle <ralf@linux-mips.org>
Fix deadlock in NetROM due to double locking. I was sent the patch by
Alan and have doublechecked it. This bug hits Net/ROM users really hard.
It's accepted by DaveM - but just too late to make it into 2.6.11.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- bk-afu.orig/net/netrom/nr_in.c 2005-02-05 22:16:25.553987776 +0000
+++ bk-afu/net/netrom/nr_in.c 2005-02-05 22:16:25.555987472 +0000
@@ -74,7 +74,6 @@
static int nr_state1_machine(struct sock *sk, struct sk_buff *skb,
int frametype)
{
- bh_lock_sock(sk);
switch (frametype) {
case NR_CONNACK: {
nr_cb *nr = nr_sk(sk);
@@ -103,8 +102,6 @@
default:
break;
}
- bh_unlock_sock(sk);
-
return 0;
}
@@ -116,7 +113,6 @@
static int nr_state2_machine(struct sock *sk, struct sk_buff *skb,
int frametype)
{
- bh_lock_sock(sk);
switch (frametype) {
case NR_CONNACK | NR_CHOKE_FLAG:
nr_disconnect(sk, ECONNRESET);
@@ -132,8 +128,6 @@
default:
break;
}
- bh_unlock_sock(sk);
-
return 0;
}
@@ -154,7 +148,6 @@
nr = skb->data[18];
ns = skb->data[17];
- bh_lock_sock(sk);
switch (frametype) {
case NR_CONNREQ:
nr_write_internal(sk, NR_CONNACK);
@@ -265,8 +258,6 @@
default:
break;
}
- bh_unlock_sock(sk);
-
return queued;
}
next prev parent reply other threads:[~2005-03-16 23:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 23:53 [0/9] -stable review Chris Wright
2005-03-16 23:54 ` [1/9] [ALSA] Fix stereo mutes on Surround volume control Chris Wright
2005-03-16 23:54 ` [2/9] Possible AMD8111e free irq issue Chris Wright
2005-03-17 0:19 ` Ian Pilcher
2005-03-17 1:03 ` Chris Wright
2005-03-17 1:13 ` Ian Pilcher
2005-03-17 2:00 ` Jeff Garzik
2005-03-16 23:54 ` [3/9] [IPSEC]: Fix __xfrm_find_acq_byseq() Chris Wright
2005-03-16 23:54 ` Chris Wright [this message]
2005-03-16 23:55 ` [5/9] [TUN] Fix check for underflow Chris Wright
2005-03-17 0:13 ` Patrick McHardy
2005-03-17 0:23 ` Chris Wright
2005-03-16 23:55 ` [6/9] tasklist left locked Chris Wright
2005-03-16 23:55 ` [7/9] Timercode race in AX.25 Chris Wright
2005-03-16 23:55 ` [8/9] Possible VIA-Rhine free irq issue Chris Wright
2005-03-16 23:55 ` [9/9] Fix kernel panic on receive with WAN Hitachi SCA HD6457x Chris Wright
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=20050316235454.GC5389@shell0.pdx.osdl.net \
--to=chrisw@osdl.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=cliffw@osdl.org \
--cc=jmforbes@linuxtx.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=rddunlap@osdl.org \
--cc=stable@kernel.org \
--cc=torvalds@osdl.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
/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