All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: fix workqueue not getting destroyed after rmmod
@ 2021-12-23  3:56 ` Aditya Kumar Singh
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Kumar Singh @ 2021-12-23  3:56 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Aditya Kumar Singh

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: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 2ba3bf8..6de0fc5 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/module.h>
@@ -1172,6 +1173,9 @@ EXPORT_SYMBOL(ath11k_core_deinit);
 
 void ath11k_core_free(struct ath11k_base *ab)
 {
+	flush_workqueue(ab->workqueue);
+	destroy_workqueue(ab->workqueue);
+
 	kfree(ab);
 }
 EXPORT_SYMBOL(ath11k_core_free);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ath11k: fix workqueue not getting destroyed after rmmod
@ 2021-12-23  3:56 ` Aditya Kumar Singh
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Kumar Singh @ 2021-12-23  3:56 UTC (permalink / raw)
  To: ath11k; +Cc: linux-wireless, Aditya Kumar Singh

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: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 2ba3bf8..6de0fc5 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/module.h>
@@ -1172,6 +1173,9 @@ EXPORT_SYMBOL(ath11k_core_deinit);
 
 void ath11k_core_free(struct ath11k_base *ab)
 {
+	flush_workqueue(ab->workqueue);
+	destroy_workqueue(ab->workqueue);
+
 	kfree(ab);
 }
 EXPORT_SYMBOL(ath11k_core_free);
-- 
2.7.4


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: fix workqueue not getting destroyed after rmmod
  2021-12-23  3:56 ` Aditya Kumar Singh
@ 2022-01-11 14:38   ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-01-11 14:38 UTC (permalink / raw)
  To: Aditya Kumar Singh; +Cc: ath11k, linux-wireless, Aditya Kumar Singh

Aditya Kumar Singh <quic_adisi@quicinc.com> wrote:

> 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: Aditya Kumar Singh <quic_adisi@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

9f4ecacf2fa4 ath11k: fix workqueue not getting destroyed after rmmod

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1640231787-17408-1-git-send-email-quic_adisi@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath11k: fix workqueue not getting destroyed after rmmod
@ 2022-01-11 14:38   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-01-11 14:38 UTC (permalink / raw)
  To: Aditya Kumar Singh; +Cc: ath11k, linux-wireless, Aditya Kumar Singh

Aditya Kumar Singh <quic_adisi@quicinc.com> wrote:

> 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: Aditya Kumar Singh <quic_adisi@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

9f4ecacf2fa4 ath11k: fix workqueue not getting destroyed after rmmod

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1640231787-17408-1-git-send-email-quic_adisi@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-11 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23  3:56 [PATCH] ath11k: fix workqueue not getting destroyed after rmmod Aditya Kumar Singh
2021-12-23  3:56 ` Aditya Kumar Singh
2022-01-11 14:38 ` Kalle Valo
2022-01-11 14:38   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.