commit | 1a2eacc9e8ed49b6f826f69f99bb39972f1fa6a9 | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Thu Jun 01 15:34:21 2017 -0700 |
committer | Josh Gao <jmgao@google.com> | Wed Jun 07 11:06:53 2017 -0700 |
tree | a782af833b48d189df2f54b964daf8196a3e84d2 | |
parent | 8bb766e7ace361fca9fd9db73434c8c1f9b225ea [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