]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r277136:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Feb 2015 22:03:12 +0000 (22:03 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 5 Feb 2015 22:03:12 +0000 (22:03 +0000)
commitd0fa21538c397e352c328cc82df3fe335882fb09
tree999dcdae470ef5e6329547ceabf32a37822ca232
parentb25b383d9bbe77bb0e8518030ba56b0fc9252332
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/8@278295 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