Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd640761

Browse files
m-v-bgregkh
authored andcommitted
Revert "usbip: Implement a match function to fix usbip"
This commit reverts commit7a2f297 ("usbip: Implement a matchfunction to fix usbip").In summary, commitd5643d2 ("USB: Fix device driver race")inadvertently broke usbip functionality, which I resolved in an incorrectmanner by introducing a match function to usbip, usbip_match(), thatunconditionally returns true.However, the usbip_match function, as is, causes usbip to take overvirtual devices used by syzkaller for USB fuzzing, which is a regressionreported by Andrey Konovalov.Furthermore, in conjunction with the fix of another bug, handled by anotherpatch titled "usbcore/driver: Fix specific driver selection" in this patchset, the usbip_match function causes unexpected USB subsystem behaviourwhen the usbip_host driver is loaded. The unexpected behaviour can bequalified as follows:- If commit 41160802ab8e ("USB: Simplify USB ID table match") is included in the kernel, then all USB devices are bound to the usbip_host driver, which appears to the user as if all USB devices were disconnected.- If the same commit (41160802ab8e) is not in the kernel (as is the case with v5.8.10) then all USB devices are re-probed and re-bound to their original device drivers, which appears to the user as a disconnection and re-connection of USB devices.Please note that this commit will make usbip non-operational again,until yet another patch in this patch set is merged, titled"usbcore/driver: Accommodate usbip".Cc: <stable@vger.kernel.org> # 5.8: 41160802ab8e: USB: Simplify USB ID table matchCc: <stable@vger.kernel.org> # 5.8Cc: Bastien Nocera <hadess@hadess.net>Cc: Valentina Manea <valentina.manea.m@gmail.com>Cc: Shuah Khan <shuah@kernel.org>Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>Cc: Alan Stern <stern@rowland.harvard.edu>Cc: <syzkaller@googlegroups.com>Reported-by: Andrey Konovalov <andreyknvl@google.com>Tested-by: Andrey Konovalov <andreyknvl@google.com>Acked-by: Shuah Khan <skhan@linuxfoundation.org>Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>Link:https://lore.kernel.org/r/20200922110703.720960-2-m.v.b@runbox.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent2b40553 commitd640761

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

‎drivers/usb/usbip/stub_dev.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,6 @@ static void stub_disconnect(struct usb_device *udev)
461461
return;
462462
}
463463

464-
staticboolusbip_match(structusb_device*udev)
465-
{
466-
return true;
467-
}
468-
469464
#ifdefCONFIG_PM
470465

471466
/* These functions need usb_port_suspend and usb_port_resume,
@@ -491,7 +486,6 @@ struct usb_device_driver stub_driver = {
491486
.name="usbip-host",
492487
.probe=stub_probe,
493488
.disconnect=stub_disconnect,
494-
.match=usbip_match,
495489
#ifdefCONFIG_PM
496490
.suspend=stub_suspend,
497491
.resume=stub_resume,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp