qcacld-3.0: Fix reference leaks for dev_hold

hdd_for_each_adapter_dev_held_safe will call the dev_hold for each
iteration. This is to make sure that net device is not being deleted
in between the iteration. dev_put has to be done at the end of each
iteration. There are few instances in the driver where this dev_put
is missing. This will block the driver unregistration due to missing
dev_put.

To resolve this, fix all missing dev_put calls in the driver while
using hdd_for_each_adapter_dev_held_safe.

Change-Id: I1c5560ebc4abcd5eee09e03b5cba39d481398f8c
CRs-Fixed: 2824505
Esse commit está contido em:
Bapiraju Alla
2020-11-24 14:34:40 +05:30
commit de snandini
commit 4876954f67
2 arquivos alterados com 4 adições e 0 exclusões

Ver arquivo

@@ -88,6 +88,8 @@ static int wlan_hdd_recovery_notifier_call(struct notifier_block *block,
QDF_WLAN_HANG_FW_OFFSET) {
hdd_objmgr_put_vdev(vdev);
dev_put(adapter->dev);
if (next_adapter)
dev_put(next_adapter->dev);
return NOTIFY_STOP_MASK;
}
cmd = (struct hdd_hang_event_fixed_param *)hdd_buf_ptr;

Ver arquivo

@@ -8524,6 +8524,7 @@ struct hdd_adapter *hdd_get_adapter_by_rand_macaddr(
dev_put(next_adapter->dev);
return adapter;
}
dev_put(adapter->dev);
}
return NULL;
@@ -18239,6 +18240,7 @@ wlan_hdd_del_p2p_interface(struct hdd_context *hdd_ctx)
if (vdev_sync)
osif_vdev_sync_destroy(vdev_sync);
}
dev_put(adapter->dev);
}
}