commit | 7dd382ded948aa5adae3618f99d00c14c3703d05 | [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 | baa4a3d6675587c3af4bc89f6209ed846d512936 | |
parent | 3160a250107e3971cb52b0c2706afc5b928f755b [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