]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r277136:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Feb 2015 21:18:44 +0000 (21:18 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Feb 2015 21:18:44 +0000 (21:18 +0000)
commitae96e04746e24a9298342f51a2e460abe9c59285
treedb0467b88df61f30c98156ce748983a28d13fe78
parent0e4eae87991ae339e6524611f6114fe0c7330286
MFC r277136:
Resolve a special case deadlock: When two or more threads are
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met.

While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@278289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/usb/controller/usb_controller.c
sys/dev/usb/usb_bus.h
sys/dev/usb/usb_dev.c
sys/dev/usb/usb_device.c
sys/dev/usb/usb_device.h