qcacld-3.0: Use objmgr api to get the vdev for pmo
Currently pmo_psoc_get_vdev api just returns the vdev without taking the vdev reference and it is caller's responsibility to take the reference, there could be a race condition where after getting the vdev and before getting the reference of that vdev, some other thread may delete this vdev. To avoid this issue use objmgr api to get the vdev for pmo. Change-Id: I3495589e2dbbb7d8efc579a62fff1a08a92c318f CRs-Fixed: 2771211
This commit is contained in:

gecommit door
snandini

bovenliggende
2aabaa590c
commit
8e37d3f6eb
@@ -282,7 +282,7 @@ QDF_STATUS pmo_vdev_ready(struct wlan_objmgr_vdev *vdev)
|
||||
/* Register default wow patterns with firmware */
|
||||
pmo_register_wow_default_patterns(vdev);
|
||||
|
||||
pmo_vdev_put_ref(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
|
||||
|
||||
/*
|
||||
* The above APIs should return a status but don't.
|
||||
|
@@ -129,7 +129,8 @@ QDF_STATUS pmo_tgt_gtk_rsp_evt(struct wlan_objmgr_psoc *psoc,
|
||||
goto out;
|
||||
}
|
||||
|
||||
vdev = pmo_psoc_get_vdev(psoc, rsp_param->vdev_id);
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, rsp_param->vdev_id,
|
||||
WLAN_PMO_ID);
|
||||
if (!vdev) {
|
||||
pmo_err("vdev is null vdev_id:%d psoc:%pK",
|
||||
rsp_param->vdev_id, psoc);
|
||||
@@ -137,10 +138,6 @@ QDF_STATUS pmo_tgt_gtk_rsp_evt(struct wlan_objmgr_psoc *psoc,
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_vdev_get_ref(vdev);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
goto out;
|
||||
|
||||
vdev_ctx = pmo_vdev_get_priv(vdev);
|
||||
|
||||
status = pmo_get_vdev_bss_peer_mac_addr(vdev, &rsp_param->bssid);
|
||||
@@ -169,7 +166,7 @@ QDF_STATUS pmo_tgt_gtk_rsp_evt(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
dec_ref:
|
||||
pmo_vdev_put_ref(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
|
||||
out:
|
||||
pmo_exit();
|
||||
|
||||
|
Verwijs in nieuw issue
Block a user