From: Devin Wittmayer <lucid_duck@justthetip.ca>
To: Eason Lai <eason.lai@mediatek.com>
Cc: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org, Kun Wu <kun.wu@mediatek.com>,
Deren Wu <deren.wu@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Quan Zhou <quan.zhou@mediatek.com>,
Ryder Lee <ryder.lee@mediatek.com>,
Leon Yen <leon.yen@mediatek.com>,
Litien Chang <litien.chang@mediatek.com>,
JB Tsai <jb.tsai@mediatek.com>
Subject: Re: [PATCH v1] wifi: mt76: mt792x: fix memory leak in USB TX path
Date: Sun, 16 Aug 2026 18:41:40 -0700 [thread overview]
Message-ID: <20260817014140.68399-1-lucid_duck@justthetip.ca> (raw)
In-Reply-To: <af39515e4277cb0c8079ed172ac8e0fccc106063.camel@mediatek.com>
Following up on the first hunk. Looking at that path again, there is a failure
behind it I did not account for on 08-06.
mt76_skb_adjust_pad() calls skb_pad(), which frees the skb on failure, and
today mt76u_tx_queue_skb() correctly returns without touching it. Routing that
exit to err_free_skb: frees it a second time. Special casing does not help,
since skb_cow_head() on the same exit also returns -ENOMEM and is safe.
The prerequisite, in mt76_skb_adjust_pad():
- if (skb_pad(last, pad))
+ if (__skb_pad(last, pad, false))
It reaches mt7925 and SDIO too, so probably its own patch ahead of yours.
Worth flagging as well: mt76s_tx_queue_skb is not a model here, it has the same
two exits and the same missing free.
I have mt7921u here if you want a v2 tested.
Devin
next prev parent reply other threads:[~2026-08-17 1:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 7:38 [PATCH v1] wifi: mt76: mt792x: fix memory leak in USB TX path Eason Lai
2026-08-06 22:29 ` Devin Wittmayer
2026-08-12 9:20 ` Eason Lai (賴易聖)
2026-08-17 1:41 ` Devin Wittmayer [this message]
2026-08-17 9:23 ` Eason Lai (賴易聖)
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=20260817014140.68399-1-lucid_duck@justthetip.ca \
--to=lucid_duck@justthetip.ca \
--cc=deren.wu@mediatek.com \
--cc=eason.lai@mediatek.com \
--cc=jb.tsai@mediatek.com \
--cc=kun.wu@mediatek.com \
--cc=leon.yen@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=litien.chang@mediatek.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=quan.zhou@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
/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