* [PATCH] hso_spinlockfix.patch
@ 2009-01-14 9:54 Denis Joseph Barrow
2009-01-14 10:08 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Denis Joseph Barrow @ 2009-01-14 9:54 UTC (permalink / raw)
To: Linux USB kernel mailing list, Linux netdev Mailing list
[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]
Hi,
This is a really important fix it fixes a consistent kernel deadlock
when the hso driver starts going. It's against 2.6.29-rc1, 2.6.29-rc6
worked fine.
This patch obviously wasn't tested & I neither I or Filip was subscribed to the tty mailing
list to catch it.
Even with this patch the driver is still broken.
opening the serial port on the driver a second time causes a -EIO,
I've yet to figure out what but it is not returned from hso_serial_open
but a parent function.
This patch fixes a double grabbing of a spinlock all
functions which call put_rxbuf_data already have serial->serial_lock grabbed.
Signed-off-by: Denis Joseph Barrow <D.Barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
--- linux-2.6.orig/drivers/net/usb/hso.c 2009-01-13 17:39:15.000000000 +0100
+++ linux-2.6/drivers/net/usb/hso.c 2009-01-13 17:40:42.000000000 +0100
@@ -2043,9 +2043,7 @@
return -2;
}
- spin_lock(&serial->serial_lock);
tty = tty_kref_get(serial->tty);
- spin_unlock(&serial->serial_lock);
/* Push data to tty */
if (tty) {
--
best regards,
D.J. Barrow
Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
T: +32 16 311 621
F: +32 16 207 164
d.barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org
www.option.com
Disclaimer:
http://www.option.com/company/disclaimer.shtml
[-- Attachment #2: hso_spinlockfix.patch --]
[-- Type: text/x-diff, Size: 661 bytes --]
This patch fixes a double grabbing of a spinlock all
functions which call put_rxbuf_data already have serial->serial_lock grabbed.
Signed-off-by: Denis Joseph Barrow <D.Barow-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
--- linux-2.6.orig/drivers/net/usb/hso.c 2009-01-13 17:39:15.000000000 +0100
+++ linux-2.6/drivers/net/usb/hso.c 2009-01-13 17:40:42.000000000 +0100
@@ -2043,9 +2043,7 @@
return -2;
}
- spin_lock(&serial->serial_lock);
tty = tty_kref_get(serial->tty);
- spin_unlock(&serial->serial_lock);
/* Push data to tty */
if (tty) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hso_spinlockfix.patch
2009-01-14 9:54 [PATCH] hso_spinlockfix.patch Denis Joseph Barrow
@ 2009-01-14 10:08 ` David Miller
2009-01-14 10:14 ` Denis Joseph Barrow
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2009-01-14 10:08 UTC (permalink / raw)
To: D.Barow; +Cc: linux-usb, netdev
From: Denis Joseph Barrow <D.Barow@option.com>
Date: Wed, 14 Jan 2009 10:54:51 +0100
> This is a really important fix it fixes a consistent kernel deadlock
> when the hso driver starts going. It's against 2.6.29-rc1, 2.6.29-rc6
> worked fine.
Are you able to travel in time? :-) 2.6.29-rc6 has not been
released yet.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hso_spinlockfix.patch
2009-01-14 10:08 ` David Miller
@ 2009-01-14 10:14 ` Denis Joseph Barrow
0 siblings, 0 replies; 3+ messages in thread
From: Denis Joseph Barrow @ 2009-01-14 10:14 UTC (permalink / raw)
To: David Miller; +Cc: linux-usb, netdev, Linux Serial
Thanks David
Happy new year.
I meant 2.6.28-rc6,
David Miller wrote:
> From: Denis Joseph Barrow <D.Barow@option.com>
> Date: Wed, 14 Jan 2009 10:54:51 +0100
>
>> This is a really important fix it fixes a consistent kernel deadlock
>> when the hso driver starts going. It's against 2.6.29-rc1, 2.6.29-rc6
>> worked fine.
>
> Are you able to travel in time? :-) 2.6.29-rc6 has not been
> released yet.
--
best regards,
D.J. Barrow
Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
T: +32 16 311 621
F: +32 16 207 164
d.barow@option.com
www.option.com
Disclaimer:
http://www.option.com/company/disclaimer.shtml
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-14 10:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 9:54 [PATCH] hso_spinlockfix.patch Denis Joseph Barrow
2009-01-14 10:08 ` David Miller
2009-01-14 10:14 ` Denis Joseph Barrow
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).