Commit 7fd51997 authored by Miaoqing Pan's avatar Miaoqing Pan
Browse files

net: cnss2: fix memory leak for mhi_ctrl



The memory of 'pci_priv->mhi_ctrl' is kmalloced in function
cnss_pci_register_mhi(), but it never be kfreed, cause memory
leak. Call mhi_free_controller() in cnss_pci_remove() to fix
this issue.

unreferenced object 0xffffffe51a2a9e80 (size 2048):
comm "iw", pid 3500, jiffies 4295059420 (age 782.140s)
hex dump (first 32 bytes):
 00 01 00 00 00 00 ad de 00 02 00 00 00 00 ad de  ................
 80 5a d0 17 e5 ff ff ff 18 3d a1 2f e5 ff ff ff  .Z.......=./....
backtrace:
 [<000000005f91d77d>] __kmalloc+0x218/0x3ec
 [<00000000f8bfcf57>] mhi_alloc_controller+0x20/0x3c
 [<000000001bce8567>] cnss_pci_probe+0xa50/0x1288
 [<00000000ad0f67f7>] cnss_subsys_powerup+0xb8/0x190
 [<0000000058eab2ba>] __subsystem_get+0x108/0x24c
 [<000000008546dae3>] subsystem_get+0x10/0x18
 [<00000000f4f606c2>] cnss_subsystem_get+0xb4/0xbc
 [<0000000088809d33>] pld_pcie_subsystem_get+0xc/0x18 [qca_ol]
 [<00000000e760de99>] pld_subsystem_get+0x4c/0x58 [qca_ol]
 [<00000000db9e289d>] ol_ath_target_start+0xec/0x158 [qca_ol]
 [<000000005bed06e4>] ol_ath_vap_create_pre_init+0x68/0x4c0 [qca_ol]
 [<00000000d18d2645>] mlme_ext_vap_create+0x7c/0x1808 [umac]
 [<00000000d1912470>] wlan_vap_create+0x9c/0x190 [umac]
 [<000000005ef0d148>] mlme_vdev_ext_obj_create+0x6c/0x180 [umac]
 [<00000000951e85b5>] mlme_vdev_ops_ext_hdl_create+0x24/0x40 [umac]
 [<0000000078c87486>] mlme_vdev_obj_create_handler+0xd8/0x380 [umac]

Change-Id: Ic44b871cc2c4831e804644d2cf9619cea4fc5a72
Signed-off-by: default avatarMiaoqing Pan <quic_miaoqing@quicinc.com>
parent 8bc5ce0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment