[PATCH 0/1] wifi: ath9k: hif_usb: fix memory leak of remain_skbs

From: Fedor Pchelkin
Date: Sun Feb 12 2023 - 09:53:38 EST


Hello,

the problem is described in the following patch.

Some remarks:
I'm not quite sure if the function proposed in the patch should be placed
somewhere else in the code... The patch now calls it during device
deinitialization after urbs deallocation, and I suppose the interrupt
callback ath9k_hif_usb_rx_stream() not to be executed during/after that
period (in this case the leak would still remain, but I couldn't reproduce
this particular case). Maybe the function freeing remain_skbs should be
placed right before calling 'kfree(hif_dev)'?

The patch is made on top of [1] master branch.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/

---
Regards,

Fedor