Re: [RFC PATCH v1 1/6] USB: HCD: support giveback of URB in tasklet context

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

 



On Fri, Jun 21, 2013 at 5:20 PM, Oliver Neukum <oneukum@xxxxxxx> wrote:
>
> This is highly problematic. It is bound to cause resource leaks.
>
>> called.  The situation might happen when driver->remove() doesn't
>> kill the URBs with the patch applied.
>
> Well, there is no good way to handle this. But we have a simple rule.
> If usb_submit_urb() succeeds, complete() will be called.
> Breaking this rule is a bad idea.

The rule should be enhanced by calling complete() before
completing driver unbind.

>
> The best way is really to make sure that no URB survive.

Drivers may let usbcore to do that by not setting driver->soft_unbind.

I will fix the problem in v2, one solution I thought of is to flush
the endpoint's URBs which have been added to tasklet list
at the end of usb_hcd_flush_endpoint(). Any comments?

Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux