[Spice-devel] Dead lock in usbredir

hustxyj at sina.com hustxyj at sina.com
Mon Dec 15 18:36:12 PST 2014


Hi
I met a dead lock in usbredir. When a device with interrupt  endpoint was plugged in, the func usbredirhost_start_interrupt_receiving may be called, which locked the host first. Then submitted the transfer and call usbi_fd_notification, which called libusb_lock_events(ctx). Another thread "spice_usb_device_manager_usb_ev_thread" handled events from libusb. which lock the events(libusb_lock_events) first. Then func usbredirhost_buffered_packet_complete may be called which locked the host. This may cause deadlock!I had meet this several times. I think usbredirhost should lock the event lock before lock host.
Thx!Yongjian Xu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20141216/784d5230/attachment.html>


More information about the Spice-devel mailing list