linux/drivers/usb/usbip
Hongren Zheng 17d6b82d2d usb/usbip: fix wrong data added to platform device
.data of platform_device_info will be copied into .platform_data of
struct device via platform_device_add_data.

However, vhcis[i] contains a spinlock, is dynamically allocated and
used by other code, so it is not meant to be copied. The workaround
was to use void *vhci as an agent, but it was removed in the commit
suggested below.

This patch adds back the workaround and changes the way of using
platform_data accordingly.

Reported-by: syzbot+e0dbc33630a092ccf033@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/00000000000029242706077f3145@google.com/
Reported-by: syzbot+6867a9777f4b8dc4e256@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/r/0000000000007634c1060793197c@google.com/
Fixes: b8aaf639b4 ("usbip: Use platform_device_register_full()")
Tested-by: syzbot+6867a9777f4b8dc4e256@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/0000000000007ac87d0607979b6b@google.com/
Signed-off-by: Hongren Zheng <i@zenithal.me>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/ZSpHPCaQ5DDA9Ysl@Sun
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-16 19:58:49 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
stub.h usbip: Implement SG support to vhci-hcd and stub driver 2019-09-03 16:00:38 +02:00
stub_dev.c USB: usbip: fix stub_dev hub disconnect 2023-10-08 07:49:17 +02:00
stub_main.c usbip: usbip_host: Replace strlcpy with strscpy 2023-06-23 09:54:32 +02:00
stub_rx.c usbip: add USBIP_URB_* URB transfer flags 2022-08-31 09:07:53 +02:00
stub_tx.c usbip: clean up an indentation issue 2019-10-04 14:09:42 +02:00
usbip_common.c Treewide: Stop corrupting socket's task_frag 2022-12-19 17:28:49 -08:00
usbip_common.h Linux 5.12-rc8 2021-04-20 10:13:58 +02:00
usbip_event.c usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
vhci.h
vhci_hcd.c usb/usbip: fix wrong data added to platform device 2023-10-16 19:58:49 +02:00
vhci_rx.c kcov, usbip: collect coverage from vhci_rx_loop 2020-12-28 15:48:36 +01:00
vhci_sysfs.c usbip: add sysfs_lock to synchronize sysfs code paths 2021-04-05 09:05:42 +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: Remove an unnecessary goto 2023-08-08 10:36:51 +02:00
vudc_main.c usb: usbip: eliminate anonymous module_init & module_exit 2022-03-18 12:52:56 +01:00
vudc_rx.c usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define 2022-11-11 10:28:42 +01:00
vudc_sysfs.c usbip: vudc: Convert snprintf() to sysfs_emit() 2022-10-22 13:20:49 +02:00
vudc_transfer.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
vudc_tx.c