* [patch for 2.6.32? 2/2] hso: fix soft-lockup
@ 2009-11-17 22:50 akpm
2009-11-23 18:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-11-17 22:50 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, antti.kaijanmaki, greg, randy.dunlap, stable
From: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
Fix soft-lockup in hso.c which is triggered on SMP machine when
modem is removed while file descriptor(s) under /dev are still open:
old version called kref_put() too early which resulted in destroying
hso_serial and hso_device objects which were still used later on.
Signed-off-by: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
Cc: Greg KH <greg@kroah.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/usb/hso.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN drivers/net/usb/hso.c~hso-fix-soft-lockup drivers/net/usb/hso.c
--- a/drivers/net/usb/hso.c~hso-fix-soft-lockup
+++ a/drivers/net/usb/hso.c
@@ -1363,7 +1363,7 @@ static void hso_serial_close(struct tty_
/* reset the rts and dtr */
/* do the actual close */
serial->open_count--;
- kref_put(&serial->parent->ref, hso_serial_ref_free);
+
if (serial->open_count <= 0) {
serial->open_count = 0;
spin_lock_irq(&serial->serial_lock);
@@ -1383,6 +1383,8 @@ static void hso_serial_close(struct tty_
usb_autopm_put_interface(serial->parent->interface);
mutex_unlock(&serial->parent->mutex);
+
+ kref_put(&serial->parent->ref, hso_serial_ref_free);
}
/* close the requested serial port */
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch for 2.6.32? 2/2] hso: fix soft-lockup
2009-11-17 22:50 [patch for 2.6.32? 2/2] hso: fix soft-lockup akpm
@ 2009-11-23 18:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-11-23 18:54 UTC (permalink / raw)
To: akpm; +Cc: netdev, antti.kaijanmaki, greg, randy.dunlap, stable
From: akpm@linux-foundation.org
Date: Tue, 17 Nov 2009 14:50:32 -0800
> From: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
>
> Fix soft-lockup in hso.c which is triggered on SMP machine when
> modem is removed while file descriptor(s) under /dev are still open:
>
> old version called kref_put() too early which resulted in destroying
> hso_serial and hso_device objects which were still used later on.
>
> Signed-off-by: Antti Kaijanmäki <antti.kaijanmaki@nomovok.com>
> Cc: Greg KH <greg@kroah.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Randy Dunlap <randy.dunlap@oracle.com>
> Cc: <stable@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied to net-2.6
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-23 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 22:50 [patch for 2.6.32? 2/2] hso: fix soft-lockup akpm
2009-11-23 18:54 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.