summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-06-07 18:18:36 -0700
committerJosh Gao <jmgao@google.com>2017-06-19 11:17:44 -0700
commitd1f7fef69b8a65195f104eff8051fc808a5b5706 (patch)
treec413784d30a6db00a1a6258a0476889d2074ea17 /base/errors_unix.cpp
parentfe11ca54212f83c83af3a448248deb072d8041a8 (diff)
adb: fix deadlock between transport_unref and usb_close.
Fix a deadlock that happened when a reader/writer thread released a transport while the hotplug thread attempted to handle a device disconnection. Decrementing a transport refcount to zero would hold the global transport mutex and attempt to take the usb handles mutex, while the hotplug thread would hold the usb handles mutex and try to call unregister_usb_transport, which would attempt to take the global transport mutex. Resolve this by making transport_unref not take the global transport mutex. Bug: http://b/62423753 Test: python test_device.py Merged-In: Ib48b80a2091a254527f3a7d945b6a11fae61f937 Change-Id: Ib48b80a2091a254527f3a7d945b6a11fae61f937 (cherry picked from commit 7e197ef83307ffcf2f55d1b8a603d0d3bd2e1d4d)
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions