If the overflow flag is set for a host frame and the allocation of the error SKB fails, the URB should not be resubmitted immediately. Instead, call can_rx_offload_irq_finish(), since an SKB may have been added to rx-offload. Closes: https://sashiko.dev/#/bug/linux-441137e2-cd75-411f-9ff5-dc4d473c5ddb Fixes: 24bc41b45583 ("can: gs_usb: convert to NAPI/rx-offload to avoid OoO reception") Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/gs_usb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 3afddc46afa9..7095ec818ca9 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -741,7 +741,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) skb = alloc_can_err_skb(netdev, &cf); if (!skb) - goto resubmit_urb; + goto can_rx_offload_irq_finish; cf->can_id |= CAN_ERR_CRTL; cf->len = CAN_ERR_DLC; @@ -750,6 +750,7 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) gs_usb_rx_offload(dev, skb, hf); } +can_rx_offload_irq_finish: can_rx_offload_irq_finish(&dev->offload); resubmit_urb: -- 2.53.0