From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH 7/8] tty: Fix double grabbing of a spinlock
Date: Thu, 15 Jan 2009 13:31:24 +0000 [thread overview]
Message-ID: <20090115133121.21366.81872.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090115132718.21366.56187.stgit@localhost.localdomain>
From: Denis Joseph Barrow <D.Barrow@option.com>
The HSO changes for kref introduced a recursive spinlock take. All
functions which call put_rxbuf_data already have serial->serial_lock
grabbed.
[Comment to code added-AC]
Signed-off-by: Denis Joseph Barrow <D.Barrow@option.com>
Signed-off-by: Alan Cox <alan@redhat.com>
---
drivers/net/usb/hso.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 9df04dd..e25a58f 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2044,9 +2044,8 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
return -2;
}
- spin_lock(&serial->serial_lock);
+ /* All callers to put_rxbuf_data hold serial_lock */
tty = tty_kref_get(serial->tty);
- spin_unlock(&serial->serial_lock);
/* Push data to tty */
if (tty) {
next prev parent reply other threads:[~2009-01-15 13:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 13:29 [PATCH 0/8] Series short description Alan Cox
2009-01-15 13:30 ` [PATCH 1/8] tty: Fix race in the flush for some ldiscs Alan Cox
2009-01-15 13:30 ` [PATCH 2/8] 8250_pci: add support for netmos 9835 IBM devices Alan Cox
2009-01-15 13:30 ` [PATCH 3/8] serial: Add SupraExpress 336i PnP Voice Modem Alan Cox
2009-01-15 13:30 ` [PATCH 4/8] When a break signal is detected, the next character should be ignored Alan Cox
2009-01-15 13:31 ` [PATCH 5/8] ftdi_sio: fix kref leak Alan Cox
2009-01-15 13:31 ` [PATCH 6/8] tty: Fix a kref leak in the HSO driver on re-open Alan Cox
2009-01-15 13:31 ` Alan Cox [this message]
2009-01-15 13:31 ` [PATCH 8/8] hso serial throttled tty kref fix Alan Cox
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=20090115133121.21366.81872.stgit@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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
Powered by JetHome