mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Kim Wooseok <5mghybrid@khu.ac.kr>, <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	Jes Sorensen <Jes.Sorensen@gmail.com>,
	Kalle Valo <kvalo@kernel.org>, <linux-kernel@vger.kernel.org>,
	Kim Wooseok <5mghybrid@khu.ac.kr>
Subject: Re: [PATCH rtw-next v4 1/3] wifi: rtl8xxxu: free RX skb when URB submission fails
Date: Wed, 23 Sep 2026 10:26:19 +0800	[thread overview]
Message-ID: <9199cc45-08ff-4346-b4e7-afbfda32a790@RTKEXHMBS05.realtek.com.tw> (raw)
In-Reply-To: <20260921-codex-rtl-rx-v3-submit-v4-1-eeb09fe8f791@khu.ac.kr>

Kim Wooseok <5mghybrid@khu.ac.kr> wrote:

> From: Kim Wooseok <5mghybrid@khu.ac.kr>
> 
> When usb_submit_urb() fails, rtl8xxxu_submit_rx_urb() unanchors the URB
> but leaves the newly allocated skb in urb.context. For ENOMEM/EAGAIN,
> the RX worker puts the request back on the pending list. The next
> submission allocates another skb and overwrites that pointer, leaking
> the previous buffer. Stopping before the retry also leaks it, because
> pending-list cleanup frees only the URB.
> 
> Free the skb and clear urb.context in rtl8xxxu_submit_rx_urb() when
> submission fails. This keeps buffer allocation and failure cleanup in
> the same function, so a request returned for retry or teardown no longer
> owns an skb. Remove the corresponding cleanup from start and the RX
> worker; they only need to decide whether to retry or free the URB.
> 
> Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
> Assisted-by: GPT-6 Astra
> Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr>

3 patch(es) applied to rtw-next branch of rtw.git, thanks.

9f7edf4e8584 wifi: rtl8xxxu: free RX skb when URB submission fails
4c58fb8944a2 wifi: rtl8xxxu: unwind incomplete receive startup
2f77c6669410 wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors

---
https://github.com/pkshih/rtw.git


  reply	other threads:[~2026-09-23  2:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21  7:59 [PATCH rtw-next v4 0/3] wifi: rtl8xxxu: keep RX requests available across transient errors Kim Wooseok via B4 Relay
2026-09-21  7:59 ` [PATCH rtw-next v4 1/3] wifi: rtl8xxxu: free RX skb when URB submission fails Kim Wooseok via B4 Relay
2026-09-23  2:26   ` Ping-Ke Shih [this message]
2026-09-21  7:59 ` [PATCH rtw-next v4 2/3] wifi: rtl8xxxu: unwind incomplete receive startup Kim Wooseok via B4 Relay
2026-09-21  7:59 ` [PATCH rtw-next v4 3/3] wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors Kim Wooseok via B4 Relay
2026-09-22  2:54   ` Ping-Ke Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9199cc45-08ff-4346-b4e7-afbfda32a790@RTKEXHMBS05.realtek.com.tw \
    --to=pkshih@realtek.com \
    --cc=5mghybrid@khu.ac.kr \
    --cc=Jes.Sorensen@gmail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®