summaryrefslogtreecommitdiff
path: root/libunwindstack/tests/MemoryFileTest.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-07 18:54:09 -0700
commit7e197ef83307ffcf2f55d1b8a603d0d3bd2e1d4d (patch)
tree56e281d39ed58b49465eb73b40f8cd4bcb72b40c /libunwindstack/tests/MemoryFileTest.cpp
parent4db472b779c6e04007240669911ab4d113f30295 (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 Change-Id: Ib48b80a2091a254527f3a7d945b6a11fae61f937
Diffstat (limited to 'libunwindstack/tests/MemoryFileTest.cpp')
0 files changed, 0 insertions, 0 deletions