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

Message ID 20230212145238.123055-1-pchelkin@ispras.ru
Headers
Series wifi: ath9k: hif_usb: fix memory leak of remain_skbs |

Message

Fedor Pchelkin Feb. 12, 2023, 2:52 p.m. UTC
  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