mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacld-3.0: Set hdd context to null when its freed
HDD context in gp_cds_context is not getting reset to null during driver remove callback when hdd context is destroyed. Set HDD context to null to avoid any use after free. Change-Id: Ifbeaca139ed44f871266a11f4b9e973961e26cc8 CRs-Fixed: 2119187
This commit is contained in:
parent
41458e1fde
commit
493a31be99
1 changed files with 3 additions and 2 deletions
|
|
@ -5865,6 +5865,7 @@ static int hdd_context_deinit(struct hdd_context *hdd_ctx)
|
|||
*/
|
||||
static void hdd_context_destroy(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
cds_set_context(QDF_MODULE_ID_HDD, NULL);
|
||||
|
||||
wlan_hdd_deinit_tx_rx_histogram(hdd_ctx);
|
||||
|
||||
|
|
@ -7782,8 +7783,6 @@ static struct hdd_context *hdd_context_create(struct device *dev)
|
|||
|
||||
hdd_override_ini_config(hdd_ctx);
|
||||
|
||||
cds_set_context(QDF_MODULE_ID_HDD, hdd_ctx);
|
||||
|
||||
ret = hdd_context_init(hdd_ctx);
|
||||
|
||||
if (ret)
|
||||
|
|
@ -7811,6 +7810,8 @@ static struct hdd_context *hdd_context_create(struct device *dev)
|
|||
skip_multicast_logging:
|
||||
hdd_set_trace_level_for_each(hdd_ctx);
|
||||
|
||||
cds_set_context(QDF_MODULE_ID_HDD, hdd_ctx);
|
||||
|
||||
EXIT();
|
||||
|
||||
return hdd_ctx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue