]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit - sys/dev/usb/usb_device.c
MFC r263423:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Mar 2014 06:59:56 +0000 (06:59 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 27 Mar 2014 06:59:56 +0000 (06:59 +0000)
commit9f5b544589c28db6dc6755d081e71e0986bff8b6
tree1ecf3aaf2a06c2128c4f1ebc9ac55083e138ea09
parent68de702bd331c4b3438e0a30f1140d66de4b2dc7
MFC r263423:
Try to resolve a possible deadlock when detaching USB devices which
create character devices. The deadlock can happen if an application is
issuing IOCTLs which require USB refcounting, at the same time the USB
device is detaching.

There is already a counter in place in the USB device structure to
detect this situation, but it was not always checked ahead of invoking
functions that might destroy character devices, like detach, set
configuration, set alternate interface or detach active kernel driver.

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