RE: [PATCH rtw-next v4 1/4] wifi: rtw88: free the reserved pages of an interface on firmware recovery
From: Ping-Ke Shih
Date: Fri Nov 27 2026 - 00:31:56 EST
Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
> After a firmware crash, mac80211 adds the interfaces again without
> removing them first. rtw_ops_add_interface() then reinitializes the
> reserved page list, and the pages allocated before the crash leak:
>
> unreferenced object 0xffff0000cbe22c60 (size 96):
> comm "hostapd", pid 25545, jiffies 4296463067
> backtrace (crc cbdc21c4):
> kmemleak_alloc+0xcc/0xe4
> __kmalloc_cache_noprof+0x234/0x3bc
> rtw_add_rsvd_page+0x38/0xa8 [rtw88_core]
> rtw_add_rsvd_page_bcn+0x30/0x58 [rtw88_core]
> rtw_ops_add_interface+0x144/0x2cc [rtw88_core]
>
> mac80211 zeroes the driver data of a new and of a removed interface, so
> track in struct rtw_vif whether the list was initialized, and free the
> old pages when the interface is added again. Until then the pages stay
> on the list, so a download before the reconfiguration, from the beacon
> update work or a WoWLAN suspend, still finds them.
>
> Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash")
> Suggested-by: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>
> Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>