Skip to content

usbnet:fix NPE during rx_complete

Ying Lu linux-usb lkml netdev stable 4 versions – Applied

Status from this message: This patch was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 0 repliesApplied 1/1
  2. v31 patch 1 replySuperseded
  3. v21 patch 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch6 repliesSuperseded

Changes in v4 from the cover letter

-use the correct "Cc:" tag format.

Patches in v4 All 1 applied

#Subject and filesSizeRepliesApplied
1/1usbnet:fix NPE during rx_completedrivers/net/usb/usbnet.c+3 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/1] usbnet:fix NPE during rx_complete

From: Ying Lu <[email protected]>

The patchset fix the issue caused by the following modifications:
commit 04e906839a053f092ef53f4fb2d610983412b904 (usbnet: fix cyclical race on disconnect with work queue)

The issue:
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).

Fix issue:
adding the usbnet_going_away check in usb_submit_urb to synchronize the validation logic.

Changes in v4
-use the correct "Cc:" tag format.

Changes in v3
-use the correct "Fixes:" tag format.

Changes in v2
-Use the formal name instead of an email alias.

Ying Lu (1):
usbnet:fix NPE during rx_complete

 drivers/net/usb/usbnet.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.49.0