Re: [PATCH] hid: usbhid: fix possible deadlock in __usbhid_submit_report

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

 



On Sat, 21 Apr 2012, Ming Lei wrote:

> >> Think about what happens if the URB being unlinked hasn't been
> >> presented to the hardware yet. �Once it has been removed from the HCD's
> >> internal lists, there's no reason not to give it back right away. �And
> >> there's no natural time to give it back later.
> >
> > Now. The question is not when, but from which context.
> > The context should be uniform, so that the requirements
> > for locking should also be uniform.
> 
> How about always scheduling a tasklet to run what usb_unlink_urb does?
> just implement usb_unlink_urb as something like
> tasklet_schedule(unlink_tasklet).
> 
> Then we can have a uniform lock requirement and no changes are involved
> on host controller drivers.

The return values would not be correct.

On the other hand, usbnet could call usb_unlink_urb from within a 
tasklet.

Alan Stern

--
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