mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init()
@ 2026-06-09  9:25 Wentao Liang
  2026-06-09 11:00 ` Rameshkumar Sundaram
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wentao Liang @ 2026-06-09  9:25 UTC (permalink / raw)
  To: jjohnson; +Cc: linux-wireless, ath11k, linux-kernel, Wentao Liang, stable

of_get_child_by_name() returns a node pointer with refcount
incremented, but the error path when ath11k_ahb_setup_msa_resources()
fails does not release it.  Add the missing of_node_put() to avoid
leaking the reference.

Cc: stable@vger.kernel.org
Fixes: 095cb947490c ("wifi: ath11k: allow missing memory-regions")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/net/wireless/ath/ath11k/ahb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index 08d3a0c8f105..8a08275db40a 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -996,6 +996,7 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab)
 	ret = ath11k_ahb_setup_msa_resources(ab);
 	if (ret) {
 		ath11k_err(ab, "failed to setup msa resources\n");
+		of_node_put(node);
 		return ret;
 	}
 
-- 
2.34.1


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

* Re: [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init()
  2026-06-09  9:25 [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init() Wentao Liang
@ 2026-06-09 11:00 ` Rameshkumar Sundaram
  2026-07-02  9:07 ` Baochen Qiang
  2026-07-09 14:49 ` Jeff Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Rameshkumar Sundaram @ 2026-06-09 11:00 UTC (permalink / raw)
  To: Wentao Liang, jjohnson; +Cc: linux-wireless, ath11k, linux-kernel, stable

On 6/9/2026 2:55 PM, Wentao Liang wrote:
> of_get_child_by_name() returns a node pointer with refcount
> incremented, but the error path when ath11k_ahb_setup_msa_resources()
> fails does not release it.  Add the missing of_node_put() to avoid
> leaking the reference.
> 
> Cc: stable@vger.kernel.org
> Fixes: 095cb947490c ("wifi: ath11k: allow missing memory-regions")
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>

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

* Re: [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init()
  2026-06-09  9:25 [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init() Wentao Liang
  2026-06-09 11:00 ` Rameshkumar Sundaram
@ 2026-07-02  9:07 ` Baochen Qiang
  2026-07-09 14:49 ` Jeff Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Baochen Qiang @ 2026-07-02  9:07 UTC (permalink / raw)
  To: Wentao Liang, jjohnson; +Cc: linux-wireless, ath11k, linux-kernel, stable



On 6/9/2026 5:25 PM, Wentao Liang wrote:
> of_get_child_by_name() returns a node pointer with refcount
> incremented, but the error path when ath11k_ahb_setup_msa_resources()
> fails does not release it.  Add the missing of_node_put() to avoid
> leaking the reference.
> 
> Cc: stable@vger.kernel.org
> Fixes: 095cb947490c ("wifi: ath11k: allow missing memory-regions")
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>

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

* Re: [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init()
  2026-06-09  9:25 [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init() Wentao Liang
  2026-06-09 11:00 ` Rameshkumar Sundaram
  2026-07-02  9:07 ` Baochen Qiang
@ 2026-07-09 14:49 ` Jeff Johnson
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnson @ 2026-07-09 14:49 UTC (permalink / raw)
  To: jjohnson, Wentao Liang; +Cc: linux-wireless, ath11k, linux-kernel, stable


On Tue, 09 Jun 2026 09:25:28 +0000, Wentao Liang wrote:
> of_get_child_by_name() returns a node pointer with refcount
> incremented, but the error path when ath11k_ahb_setup_msa_resources()
> fails does not release it.  Add the missing of_node_put() to avoid
> leaking the reference.
> 
> 

Applied, thanks!

[1/1] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init()
      commit: 0e120ee0822b7cc650bd7b29682a34e137cec10d

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>


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

end of thread, other threads:[~2026-07-09 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09  9:25 [PATCH] wifi: ath11k: fix refcount leak in ath11k_ahb_fw_resources_init() Wentao Liang
2026-06-09 11:00 ` Rameshkumar Sundaram
2026-07-02  9:07 ` Baochen Qiang
2026-07-09 14:49 ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®