[PATCH net-next] ath11k: Fix possible memleak in ath11k_qmi_init_service

Subsystems: atheros ath generic utilities, qualcomm atheros ath11k wireless driver, the rest

STALE2190d LANDED

Landed in mainline as 28f163211881 on 2020-08-18.

2 messages, 2 authors, 2020-08-18 · open the first message on its own page

[PATCH net-next] ath11k: Fix possible memleak in ath11k_qmi_init_service

From: Wang Yufen <hidden>
Date: 2020-07-20 09:04:32

When qmi_add_lookup fail, we should destroy the workqueue

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wang Yufen <redacted>
---
 drivers/net/wireless/ath/ath11k/qmi.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index c00a99a..497cff7 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2419,6 +2419,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab)
 			     ATH11K_QMI_WLFW_SERVICE_INS_ID_V01);
 	if (ret < 0) {
 		ath11k_warn(ab, "failed to add qmi lookup\n");
+		destroy_workqueue(ab->qmi.event_wq);
 		return ret;
 	}
 
-- 
1.8.3

Re: [PATCH net-next] ath11k: Fix possible memleak in ath11k_qmi_init_service

From: Kalle Valo <hidden>
Date: 2020-08-18 09:51:46

Wang Yufen [off-list ref] wrote:
When qmi_add_lookup fail, we should destroy the workqueue

Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wang Yufen <redacted>
Signed-off-by: Kalle Valo <redacted>
Patch applied to ath-next branch of ath.git, thanks.

28f163211881 ath11k: Fix possible memleak in ath11k_qmi_init_service

-- 
https://patchwork.kernel.org/patch/11673293/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help