diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-05-10 01:25:18 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-10 01:25:18 -0700 |
| commit | 6e5dae3ae1af25ac48b005ccfb2cf7e033d312ce (patch) | |
| tree | ae877abfc5e691423dd5dbafab2a2eda81760e58 /drivers/usb/usbip/stub_main.c | |
| parent | d7521d9bb9408dd4225b9838e23a80ecc41f80fa (diff) | |
| parent | 028ce831e8f14cc94f14929f1a91d198ea2d9b93 (diff) | |
Merge "Merge android-4.4.131 (d5d6526) into msm-4.4"
Diffstat (limited to 'drivers/usb/usbip/stub_main.c')
| -rw-r--r-- | drivers/usb/usbip/stub_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c index 325b4c05acdd..f761e02e75c9 100644 --- a/drivers/usb/usbip/stub_main.c +++ b/drivers/usb/usbip/stub_main.c @@ -201,7 +201,12 @@ static ssize_t rebind_store(struct device_driver *dev, const char *buf, if (!bid) return -ENODEV; + /* device_attach() callers should hold parent lock for USB */ + if (bid->udev->dev.parent) + device_lock(bid->udev->dev.parent); ret = device_attach(&bid->udev->dev); + if (bid->udev->dev.parent) + device_unlock(bid->udev->dev.parent); if (ret < 0) { dev_err(&bid->udev->dev, "rebind failed\n"); return ret; |
