commit | caa807e157cfea5cdc7a7a69911da8176f34910b | [log] [tgz] |
---|---|---|
author | Josh Gao <[email protected]> | Thu Jun 01 15:34:21 2017 -0700 |
committer | Josh Gao <[email protected]> | Wed Jun 07 11:06:53 2017 -0700 |
tree | a782af833b48d189df2f54b964daf8196a3e84d2 | |
parent | 0d8f0108e181171cad12efbae2669232f1d63bfe [diff] |
adb: improve race between device_connected and device_disconnected. If a device is unplugged while it's being processed, we can be inside register_usb_transport still when we call unregister_usb_transport, leading to bad things happening. Move the call of register_usb_transport into the scope guarded by usb_handles_mutex. Bug: http://b/62200735 Test: manual Change-Id: I2517dcb9d30d9a08cebbb5f715ae3fd30c510109