lkml.org 
[lkml]   [2006]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: pl2303 ttyUSB0: pl2303_open - failed submitting interrupt urb, error -28
On Tue, 13 Jun 2006 13:26:55 -0300
"Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br> wrote:

| On Tue, 13 Jun 2006 13:46:06 +0200
| Frank Gevaerts <frank.gevaerts@fks.be> wrote:
|
| | On Mon, Jun 12, 2006 at 07:21:26PM -0400, Mark Lord wrote:
| | > Mark Lord wrote:
| | > >Greg KH wrote:
| | > >>So we should have finally covered both of them now.
| | > >
| | > >Yes, agreed.
| | > >
| | > >So if modify pl2303_open() to have it simulate -ENOMEM from
| | > >usb_submit_urb(),
| | > >then this should not crash the entire USB subsystem. Right?
| | > >
| | > >Ditto if it happens due to low-memory, rather than me hacking the code
| | > >to test it?
| | >
| | > Mmmm.. looks like it's still buggy, but we manage to avoid the bug
| | > under *most* circumstances. Which is good!
| | >
| | > But the bug will still need to be fixed. A failure from usb_submit_urb()
| | > should not require a reboot to recover.
| | > Here's the results of a simulated -ENOMEM test:
| | >
| | > kernel BUG at kernel/workqueue.c:110!
| |
| | We had the exact same error here with ipaq.ko. Our problems only went
| | away once we applied the following (the first part might already be
| | applied).
|
| Interesting, I couldn't reproduce this with ftdio_sio.

Ok, managed to reproduce it (in fact it happens at disconnection
time).

Frank, the second hunk of your patch fixes it, but the right
label is bailout_mutex_unlock. Like this:

diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 9c36f0e..0b7bc20 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -230,6 +230,7 @@ bailout_module_put:
module_put(serial->type->driver.owner);
bailout_mutex_unlock:
port->open_count = 0;
+ tty->driver_data = port->tty = NULL;
mutex_unlock(&port->mutex);
bailout_kref_put:
kref_put(&serial->kref, destroy_serial);
Could you redo and submit please?

--
Luiz Fernando N. Capitulino
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-13 19:48    [W:0.051 / U:4.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site