]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: Fix memory leak destroying device
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 8 Dec 2025 18:54:08 +0000 (19:54 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Mar 2026 09:23:00 +0000 (09:23 +0000)
commit6b470f36616e3448d44b0ef4b1de2a3e3a31b5be
treeb2f257c2b65233f005ee21e2dd3f03a8137dfec5
parent5373f8b19e568b5c217832b9bbef165bd2b2df14
wifi: mt76: Fix memory leak destroying device

All MT76 rx queues have an associated page_pool even if the queue is not
associated to a NAPI (e.g. WED RRO queues with WED enabled). Destroy the
page_pool running mt76_dma_cleanup routine during module unload.
Moreover returns pages to the page pool if WED is not enabled for WED RRO
queues.

Fixes: 950d0abb5cd94 ("wifi: mt76: mt7996: add wed rx support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20251208-mt76-fix-memory-leak-v1-1-cba813fc62b8@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c