Re: pl2303 ttyUSB0: pl2303_open - failed submitting interrupt urb, error -28

From: Frank Gevaerts
Date: Tue Jun 13 2006 - 07:45:45 EST


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).
Apart from that, we also needed a lot of fixes in ipaq.c. I still have
to clean up and submit the complete patch.

Frank

Signed-of-byA Frank Gevaerts <frank.gevaerts@xxxxxx>

--- linux-2.6.17-rc4/drivers/usb/serial/usb-serial.c 2006-05-30 19:01:16.000000000 +0200
+++ linux-2.6.17-rc4.test/drivers/usb/serial/usb-serial.c 2006-06-02 21:50:07.000000000 +0200
@@ -162,6 +162,8 @@ static void destroy_serial(struct kref *
}
}

+ flush_scheduled_work(); /* port->work */
+
usb_put_dev(serial->dev);

/* free up any memory that we allocated */
@@ -223,6 +225,8 @@ static int serial_open (struct tty_struc
return 0;

bailout_module_put:
+ tty->driver_data = NULL;
+ port->tty = NULL;
module_put(serial->type->driver.owner);
bailout_kref_put:
kref_put(&serial->kref, destroy_serial);

Frank

--
Frank Gevaerts frank.gevaerts@xxxxxx
fks bvba - Formal and Knowledge Systems http://www.fks.be/
Stationsstraat 108 Tel: ++32-(0)11-21 49 11
B-3570 ALKEN Fax: ++32-(0)11-22 04 19
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/