• Zumeng Chen's avatar
    wlcore: Fix memory leak in case wl12xx_fetch_firmware failure · 38af5462
    Zumeng Chen authored
    [ Upstream commit ba2ffc96 ]
    
    Release fw_status, raw_fw_status, and tx_res_if when wl12xx_fetch_firmware
    failed instead of meaningless goto out to avoid the following memory leak
    reports(Only the last one listed):
    
    unreferenced object 0xc28a9a00 (size 512):
      comm "kworker/0:4", pid 31298, jiffies 2783204 (age 203.290s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
      backtrace:
        [<6624adab>] kmemleak_alloc+0x40/0x74
        [<500ddb31>] kmem_cache_alloc_trace+0x1ac/0x270
        [<db4d731d>] wl12xx_chip_wakeup+0xc4/0x1fc [wlcore]
        [<76c5db53>] wl1271_op_add_interface+0x4a4/0x8f4 [wlcore]
        [<cbf30777>] drv_add_interface+0xa4/0x1a0 [mac80211]
        [<65bac325>] ieee80211_reconfig+0x9c0/0x1644 [mac80211]
        [<2817c80e>] ieee80211_restart_work+0x90/0xc8 [mac80211]
        [<7e1d425a>] process_one_work+0x284/0x42c
        [<55f9432e>] worker_thread+0x2fc/0x48c
        [<abb582c6>] kthread+0x148/0x160
        [<63144b13>] ret_from_fork+0x14/0x2c
        [< (null)>] (null)
        [<1f6e7715>] 0xffffffff
    Signed-off-by: 's avatarZumeng Chen <zumeng.chen@gmail.com>
    Signed-off-by: 's avatarKalle Valo <kvalo@codeaurora.org>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    38af5462
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...