qcacld-3.0: Use objmgr api to get the vdev for pmo
Currently pmo disable run time pm offload api gets the vdev inside psoc obj lock but tries to take the reference of vdev without any lock protection, in this case it is possible that one thread gets the vdev and when it troes to get the vdev reference some other thread deletes the vdev because if which first thread will not be able to get the reference for the vdev which it alreaady holds. To address above issue use objmgr api to get the vdev. Change-Id: I8f47515f39ace809cfe9e134fd704a2914ed3d9a CRs-Fixed: 2769887
This commit is contained in:

committed by
snandini

orang tua
822e4f01a2
melakukan
95e385cfe1
@@ -453,16 +453,13 @@ static void pmo_core_disable_runtime_pm_offloads(struct wlan_objmgr_psoc *psoc)
|
|||||||
{
|
{
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
struct wlan_objmgr_vdev *vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
QDF_STATUS status;
|
|
||||||
|
|
||||||
/* Iterate through VDEV list */
|
/* Iterate through VDEV list */
|
||||||
for (vdev_id = 0; vdev_id < WLAN_UMAC_PSOC_MAX_VDEVS; vdev_id++) {
|
for (vdev_id = 0; vdev_id < WLAN_UMAC_PSOC_MAX_VDEVS; vdev_id++) {
|
||||||
vdev = pmo_psoc_get_vdev(psoc, vdev_id);
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||||
|
WLAN_PMO_ID);
|
||||||
if (!vdev)
|
if (!vdev)
|
||||||
continue;
|
continue;
|
||||||
status = pmo_vdev_get_ref(vdev);
|
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
pmo_clear_action_frame_patterns(vdev);
|
pmo_clear_action_frame_patterns(vdev);
|
||||||
pmo_vdev_put_ref(vdev);
|
pmo_vdev_put_ref(vdev);
|
||||||
|
Reference in New Issue
Block a user