diff mbox

hso_spinlockfix.patch

Message ID 496DB66B.4070306@option.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Denis Joseph Barrow Jan. 14, 2009, 9:54 a.m. UTC
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@option.com>

Comments

David Miller Jan. 14, 2009, 10:08 a.m. UTC | #1
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Denis Joseph Barrow Jan. 14, 2009, 10:14 a.m. UTC | #2
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.
diff mbox

Patch

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@option.com>
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) {