[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] usb bluetooth

Noticed in bluetooth_read_bulk_callback (2.4 stock kernel) that we
always resubmit the urb come hell or high water.

What happens when we call bluetooth_close and cancel the read URB? We
then exit, leaving the read URB to its fate. Looks like we just keep
resubmitting the urb forever after the close (I think the callback runs
on an irq -- it used to, anyway). Even worse, if somebody then rmmod's
the driver...

I've attached a patch.


--- src/linux/drivers/usb/bluetooth.c	Mon Mar 19 18:21:54 2001
+++ tmp/bluetooth.c	Thu May  3 16:25:09 2001
@@ -864,6 +864,10 @@
 	if (urb->status) {
 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
+		if (urb->status == -ENOENT) {			
+			dbg(__FUNCTION__ " - URB canceled, won't reschedule");
+			return;
+		}
 		goto exit;