linux-stable/drivers/usb/usbip
M. Vefa Bicakci 7a2f2974f2 usbip: Implement a match function to fix usbip
Commit 88b7381a93 ("USB: Select better matching USB drivers when
available") introduced the use of a "match" function to select a
non-generic/better driver for a particular USB device. This
unfortunately breaks the operation of usbip in general, as reported in
the kernel bugzilla with bug 208267 (linked below).

Upon inspecting the aforementioned commit, one can observe that the
original code in the usb_device_match function used to return 1
unconditionally, but the aforementioned commit makes the usb_device_match
function use identifier tables and "match" virtual functions, if either of
them are available.

Hence, this commit implements a match function for usbip that
unconditionally returns true to ensure that usbip is functional again.

This change has been verified to restore usbip functionality, with a
v5.7.y kernel on an up-to-date version of Qubes OS 4.0, which uses
usbip to redirect USB devices between VMs.

Thanks to Jonathan Dieter for the effort in bisecting this issue down
to the aforementioned commit.

Fixes: 88b7381a93 ("USB: Select better matching USB drivers when available")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=208267
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1856443
Link: https://github.com/QubesOS/qubes-issues/issues/5905
Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>
Cc: <stable@vger.kernel.org> # 5.7
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20200810160017.46002-1-m.v.b@runbox.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-18 11:55:23 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stub.h usbip: Implement SG support to vhci-hcd and stub driver 2019-09-03 16:00:38 +02:00
stub_dev.c usbip: Implement a match function to fix usbip 2020-08-18 11:55:23 +02:00
stub_main.c usbip: Implement SG support to vhci-hcd and stub driver 2019-09-03 16:00:38 +02:00
stub_rx.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
stub_tx.c usbip: clean up an indentation issue 2019-10-04 14:09:42 +02:00
usbip_common.c usbip: Fix receive error in vhci-hcd when using scatter-gather 2019-12-17 16:36:32 +01:00
usbip_common.h usb: usbip: fix isoc packet num validation in get_pipe 2019-04-25 11:11:41 +02:00
usbip_event.c usbip: usbip_event: fix to not print kernel pointer address 2018-04-22 14:45:12 +02:00
vhci.h USB: usbip: Remove redundant license text 2017-11-07 15:45:01 +01:00
vhci_hcd.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
vhci_rx.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
vhci_sysfs.c usbip: vhci_sysfs: fix potential Spectre v1 2018-05-24 18:14:28 +02:00
vhci_tx.c usbip: Fix free of unallocated memory in vhci tx 2019-10-28 17:51:06 +01:00
vudc.h USB: usbip: convert platform driver to use dev_groups 2019-08-06 09:40:47 +02:00
vudc_dev.c USB: usbip: convert platform driver to use dev_groups 2019-08-06 09:40:47 +02:00
vudc_main.c USB: usbip: convert platform driver to use dev_groups 2019-08-06 09:40:47 +02:00
vudc_rx.c usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input 2018-01-04 17:07:26 +01:00
vudc_sysfs.c USB: usbip: convert platform driver to use dev_groups 2019-08-06 09:40:47 +02:00
vudc_transfer.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
vudc_tx.c usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer 2018-01-04 17:07:27 +01:00