platform_device_del() instead and let put_vudc_device() do
the platform_device_put().
Reported-by: Randy Dunlap
Signed-off-by: Shuah Khan (Samsung OSG)
Cc:
---
drivers/usb/usbip/vudc_main.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/usbip
reproduce the problem and verify the fix:
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ed8ab640
Reported-by: syzbot+bccc1fe10b70fadc7...@syzkaller.appspotmail.com
Signed-off-by: Shuah Khan (Samsung OSG)
---
drivers/usb/usbip/vhci_hcd.c | 57
Add sleep between attach and "usbip port" check to make sure status is
updated. Running attach and query back shows incorrect status.
Signed-off-by: Shuah Khan (Samsung OSG)
---
tools/testing/selftests/drivers/usb/usbip/usbip_test.sh | 4
1 file changed, 4 insertions(+)
diff --g
22076557b07c ("usbip: usbip_host: fix NULL-ptr deref and
use-after-free errors") in usb-linus
Signed-off-by: Shuah Khan (Samsung OSG)
---
drivers/usb/usbip/stub_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/
stub_device_rebind()
call put_busid_priv() to release the busid lock before returning. This
changes fixes the unprotected code paths eliminating the race conditions
in updating the busid entries.
Signed-off-by: Shuah Khan (Samsung OSG)
---
drivers/usb/usbip/stub.h | 2 ++
drivers/usb/usbip
the devices to their original drivers. This includes cleanup changes
and moving device_attach() code to a common routine to be called from
rebind_store() and usbip_host_exit().
Signed-off-by: Shuah Khan (Samsung OSG)
---
drivers/usb/usbip/stub_dev.c | 6 +
drivers/usb/usbip/stub_main.c
.
Signed-off-by: Shuah Khan (Samsung OSG)
---
drivers/usb/usbip/stub_main.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/usbip/stub_main.c b/drivers/usb/usbip/stub_main.c
index d41d0cdeec0f..fb46bd62d538 100644
--- a/drivers/usb/usbip/stub_main.c
+++ b/drivers/usb/usbip