Commit 735b2d7f authored by Ying Lu's avatar Ying Lu Committed by Yanbo Liu
Browse files

UPSTREAM: usbnet:fix NPE during rx_complete



Missing usbnet_going_away Check in Critical Path.
The usb_submit_urb function lacks a usbnet_going_away
validation, whereas __usbnet_queue_skb includes this check.

This inconsistency creates a race condition where:
A URB request may succeed, but the corresponding SKB data
fails to be queued.

Subsequent processes:
(e.g., rx_complete → defer_bh → __skb_unlink(skb, list))
attempt to access skb->next, triggering a NULL pointer
dereference (Kernel Panic).

Fixes: 04e90683 ("usbnet: fix cyclical race on disconnect with work queue")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarYing Lu <luying1@xiaomi.com>
Link: https://patch.msgid.link/4c9ef2efaa07eb7f9a5042b74348a67e5a3a7aea.1743584159.git.luying1@xiaomi.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 51de3600)
Bug: 407666077
Bug: 417644591
Change-Id: I02ae4319d03e78ced2d91df20fbc7321198b8d70
Signed-off-by: default avatarYing Lu <luying1@xiaomi.corp-partner.google.com>
(cherry picked from commit af63db2f)
parent e32e14fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment