Re: [PATCH v7 08/13] can: peak_usb: reject records for unset channels in PCAN-USB Pro
From: Stéphane Grosjean
Date: Mon Nov 02 2026 - 06:00:01 EST
On 01/11/2026 03:15, netdev-bot+sashiko@xxxxxxxxxx wrote:
[...]
> [Severity: Low]
> When the slot is empty, pcan_usb_pro_handle_canmsg() returns -EINVAL.
[...]
> This is still better than the NULL dereference that happened before.
> Later in the series, "can: peak_usb: register the netdevs only once all
> channels are set up" registers the netdevs in peak_usb_probe() only
> after every channel's dev_init() has filled its slot. That way RX
> cannot run while a slot is NULL.
Yes, this is intended, as discussed on v6: the case can't happen once
patch 9 is applied, and patch 12 dumps the URB once, rate limited.
[...]
> [Severity: Medium]
> This is a pre-existing issue, not one introduced by this patch, but it
> is in the caller of these handlers. pcan_usb_pro_decode_buf() reads
> pr->data_type before it checks that rec_ptr is still below msg_end:
[...]
> [Severity: High]
> This isn't a bug introduced by this patch, but pdev->usb_if is only set
> here.
Both pre-existing, and fixed later in the series, as you note: the
first one by patch 11, the second one by patch 9.
Thanks!
Stéphane