qcacld-3.0: take vdev reference before passing the vdev around
While STA is connecting we check if SAP is on any of the dfs channels passing the vdev without taking vdev reference. SAP interface can be removed in the other thread resulting in invalid access. So take the vdev reference before passing the vdev. Change-Id: I5e1e24c5c8a3f877143bc2fc1b7a5744452ac9c6 CRs-Fixed: 3541378
This commit is contained in:

committed by
Rahul Choudhary

parent
c719dbf10d
commit
deb06bc73b
@@ -518,12 +518,19 @@ hdd_get_sap_adapter_of_dfs(struct hdd_context *hdd_ctx)
|
||||
hdd_ctx->dev_dfs_cac_status != DFS_CAC_IN_PROGRESS)
|
||||
continue;
|
||||
|
||||
wlan_objmgr_vdev_get_ref(link_info->vdev,
|
||||
WLAN_HDD_ID_OBJ_MGR);
|
||||
chan = wlan_vdev_get_active_channel(link_info->vdev);
|
||||
if (!chan) {
|
||||
hdd_debug("Can not get active channel");
|
||||
wlan_objmgr_vdev_release_ref(link_info->vdev,
|
||||
WLAN_HDD_ID_OBJ_MGR);
|
||||
continue;
|
||||
}
|
||||
|
||||
wlan_objmgr_vdev_release_ref(link_info->vdev,
|
||||
WLAN_HDD_ID_OBJ_MGR);
|
||||
|
||||
if (!wlan_reg_is_5ghz_ch_freq(chan->ch_freq))
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user