usbip: usbip_host: delete device from busid_table after rebind
authorShuah Khan (Samsung OSG) <shuah@kernel.org>
Mon, 30 Apr 2018 22:17:19 +0000 (16:17 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 May 2018 16:53:55 +0000 (18:53 +0200)
commitcf3bcc3231ade09dd2733ca7d0f34d90ee7fe8fd
tree84ceacfa0cec35038203728dbc488daec8f66885
parenta3d5f6ecba9923a669a5991b8dbd3398c59bf892
usbip: usbip_host: delete device from busid_table after rebind

commit 1e180f167d4e413afccbbb4a421b48b2de832549 upstream.

Device is left in the busid_table after unbind and rebind. Rebind
initiates usb bus scan and the original driver claims the device.
After rescan the device should be deleted from the busid_table as
it no longer belongs to usbip_host.

Fix it to delete the device after device_attach() succeeds.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/stub_main.c