提交 9f4ecacf 编写于 作者: A Aditya Kumar Singh 提交者: Kalle Valo

ath11k: fix workqueue not getting destroyed after rmmod

Currently, ath11k_core_alloc() creates a single thread workqueue.
This workqueue is not detroyed during clean up when ath11k modules
are unloaded from the kernel and is left as it is.
If workqueue is not destroyed, it could lead to kernel
memory scarcity in a longer run. This could affect self and
other drivers workability as well.

Add destroy workqueue in ath11k_core_free().

Tested on: IPQ8074 WLAN.HK.2.4.0.1-01746-QCAHKSWPL_SILICONZ-1
Signed-off-by: NAditya Kumar Singh <quic_adisi@quicinc.com>
Signed-off-by: NKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/1640231787-17408-1-git-send-email-quic_adisi@quicinc.com
上级 e3fb3d44
// SPDX-License-Identifier: BSD-3-Clause-Clear // SPDX-License-Identifier: BSD-3-Clause-Clear
/* /*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -1404,6 +1405,9 @@ EXPORT_SYMBOL(ath11k_core_deinit); ...@@ -1404,6 +1405,9 @@ EXPORT_SYMBOL(ath11k_core_deinit);
void ath11k_core_free(struct ath11k_base *ab) void ath11k_core_free(struct ath11k_base *ab)
{ {
flush_workqueue(ab->workqueue);
destroy_workqueue(ab->workqueue);
kfree(ab); kfree(ab);
} }
EXPORT_SYMBOL(ath11k_core_free); EXPORT_SYMBOL(ath11k_core_free);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册