linux/drivers/char/xillybus
Eli Billauer 2374bf7558 char: xillybus: Check USB endpoints when probing device
Ensure, as the driver probes the device, that all endpoints that the
driver may attempt to access exist and are of the correct type.

All XillyUSB devices must have a Bulk IN and Bulk OUT endpoint at
address 1. This is verified in xillyusb_setup_base_eps().

On top of that, a XillyUSB device may have additional Bulk OUT
endpoints. The information about these endpoints' addresses is deduced
from a data structure (the IDT) that the driver fetches from the device
while probing it. These endpoints are checked in setup_channels().

A XillyUSB device never has more than one IN endpoint, as all data
towards the host is multiplexed in this single Bulk IN endpoint. This is
why setup_channels() only checks OUT endpoints.

Reported-by: syzbot+eac39cba052f2e750dbe@syzkaller.appspotmail.com
Cc: stable <stable@kernel.org>
Closes: https://lore.kernel.org/all/0000000000001d44a6061f7a54ee@google.com/T/
Fixes: a53d1202ae ("char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)").
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Link: https://lore.kernel.org/r/20240816070200.50695-2-eli.billauer@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-16 09:57:56 +02:00
..
Kconfig char: xillybus: make XILLYBUS_OF depend on HAS_IOMEM 2023-08-04 15:39:39 +02:00
Makefile char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) 2021-05-27 14:07:41 +02:00
xillybus_class.c char: xillybus: make xillybus_class a static const structure 2023-06-23 10:27:26 +02:00
xillybus_class.h char: xillybus: Move class-related functions to new xillybus_class.c 2021-05-27 14:07:41 +02:00
xillybus_core.c char: xillybus: Eliminate redundant wrappers to DMA related calls 2021-10-05 16:11:11 +02:00
xillybus_of.c char: xillybus: Convert to platform remove callback returning void 2024-03-07 21:49:30 +00:00
xillybus_pcie.c char: xillybus: Eliminate redundant wrappers to DMA related calls 2021-10-05 16:11:11 +02:00
xillybus.h char: xillybus: Eliminate redundant wrappers to DMA related calls 2021-10-05 16:11:11 +02:00
xillyusb.c char: xillybus: Check USB endpoints when probing device 2024-08-16 09:57:56 +02:00