Linux wireless drivers development
 help / color / mirror / Atom feed
* [BUG] rtlwifi: Resource leaks in error handling code of rtl_pci_probe()
@ 2019-05-14 12:55 Jia-Ju Bai
  0 siblings, 0 replies; only message in thread
From: Jia-Ju Bai @ 2019-05-14 12:55 UTC (permalink / raw)
  To: pkshih, kvalo, davem; +Cc: linux-wireless, netdev, Linux Kernel Mailing List

In rtl_pci_probe(), rtl_pci_init() allocates some resources, such as:
_rtl_pci_init_trx_ring
   _rtl_pci_init_rx_ring
     _rtl_pci_init_rx_ring
       pci_zalloc_consistent() -- resource
       _rtl_pci_init_one_rxdesc
         dev_alloc_skb() -- resource

_rtl_pci_init_trx_ring
   _rtl_pci_init_tx_ring
     pci_zalloc_consistent() -- resource

When ieee80211_register_hw() or rtl_pci_intr_mode_decide() fails, these 
resources are not released in error handling code.

A possible fix is to call rtl_pci_deinit() in error handling code, but I 
am not sure whether this is correct.
Thus, I only report the bugs.

These bugs are found by a runtime fuzzing tool named FIZZER written by us.


Best wishes,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-14 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-14 12:55 [BUG] rtlwifi: Resource leaks in error handling code of rtl_pci_probe() Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox