mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-16 08:59:57 +00:00
ath11k: Fix memory leak in ath11k_qmi_driver_event_work
The buffer pointed to by event is not freed in case
ATH11K_FLAG_UNREGISTERING bit is set, resulting in
memory leak, so fix it.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210913180246.193388-4-jouni@codeaurora.org
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
This commit is contained in:
parent
d64e3c8d14
commit
194109d317
@ -0,0 +1,39 @@
|
||||
From 72de799aa9e3e064b35238ef053d2f0a49db055a Mon Sep 17 00:00:00 2001
|
||||
From: Baochen Qiang <bqiang@codeaurora.org>
|
||||
Date: Tue, 28 Sep 2021 14:00:44 +0300
|
||||
Subject: ath11k: Fix memory leak in ath11k_qmi_driver_event_work
|
||||
|
||||
The buffer pointed to by event is not freed in case
|
||||
ATH11K_FLAG_UNREGISTERING bit is set, resulting in
|
||||
memory leak, so fix it.
|
||||
|
||||
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1
|
||||
|
||||
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
|
||||
Signed-off-by: Baochen Qiang <bqiang@codeaurora.org>
|
||||
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
Link: https://lore.kernel.org/r/20210913180246.193388-4-jouni@codeaurora.org
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/qmi.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
index babadd574e4b9c..8c615bc788cacf 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
|
||||
@@ -2759,8 +2759,10 @@ static void ath11k_qmi_driver_event_work(struct work_struct *work)
|
||||
list_del(&event->list);
|
||||
spin_unlock(&qmi->event_lock);
|
||||
|
||||
- if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags))
|
||||
+ if (test_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags)) {
|
||||
+ kfree(event);
|
||||
return;
|
||||
+ }
|
||||
|
||||
switch (event->type) {
|
||||
case ATH11K_QMI_EVENT_SERVER_ARRIVE:
|
||||
--
|
||||
cgit 1.2.3-korg
|
||||
|
||||
Loading…
Reference in New Issue
Block a user