[PATCH] wifi: mt76: Fix skb reference leak on USB/SDIO tx_queue_skb error paths

Devin Wittmayer lucid_duck at justthetip.ca
Thu Sep 17 08:48:13 PDT 2026


Wentao,

Thanks for catching this. The USB half is already fixed and the patch is
sitting in Felix's tree:

	Eason Lai, "wifi: mt76: fix memory leak in USB TX path"
	v5 posted 14 September, Fixes: b40b15e1521f, same as your USB half

It does not cover the SDIO side you are patching, so that half is still
open. One thing to fold in before you respin: frames the driver wants
transmit status for go into a per-station table, and freeing one outright
leaves the table pointing at it.

	mt7921_usb_sdio_tx_prepare_skb  asks for status every HZ/4 per
					station, then puts the frame in
					that station's table
	mt76_tx_status_skb_get		sweeps what is still in there and
					reads a flag and a timestamp out
					of each entry

Eason's version marks the frame done and leaves it for that sweep to
reclaim.

Devin



More information about the Linux-mediatek mailing list