linux/drivers/net/can/usb/kvaser_usb
Johan Hovold 5660493c63 can: kvaser_usb: fix interface sanity check
Make sure to use the current alternate setting when verifying the
interface descriptors to avoid binding to an invalid interface.

Failing to do so could cause the driver to misbehave or trigger a WARN()
in usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: aec5fb2268 ("can: kvaser_usb: Add support for Kvaser USB hydra family")
Cc: stable <stable@vger.kernel.org>     # 4.19
Cc: Jimmy Assarsson <extja@kvaser.com>
Cc: Christer Beskow <chbe@kvaser.com>
Cc: Nicklas Johansson <extnj@kvaser.com>
Cc: Martin Henriksson <mh@kvaser.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-01-02 15:34:27 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
kvaser_usb.h
kvaser_usb_core.c can: kvaser_usb: Use struct_size() in alloc_candev() 2019-07-24 10:31:53 +02:00
kvaser_usb_hydra.c can: kvaser_usb: fix interface sanity check 2020-01-02 15:34:27 +01:00
kvaser_usb_leaf.c can: kvaser_usb: fix interface sanity check 2020-01-02 15:34:27 +01:00