From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: ZhaoJinming <zhaojinming@uniontech.com>,
Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] wifi: ath11k: fix resource leak on error in ext IRQ setup
Date: Tue, 21 Jul 2026 15:40:57 +0800 [thread overview]
Message-ID: <6ef27e6d-4313-4655-b166-987185e67ae3@oss.qualcomm.com> (raw)
In-Reply-To: <20260721072128.142668-1-zhaojinming@uniontech.com>
On 7/21/2026 3:21 PM, ZhaoJinming wrote:
> In ath11k_ahb_config_irq(), when a CE request_irq() fails, the function
> returns the error immediately without freeing the CE IRQs that were
> successfully registered in previous loop iterations. The probe error
> path does not call ath11k_ahb_free_irq() either, so the previously
> registered CE IRQ handlers remain attached to the interrupt lines and
> are never released.
>
> In ath11k_ahb_config_ext_irq(), when an external request_irq() fails,
> the error is only logged and the loop continues. The function then
> returns 0 indicating success, leaving the device in a partially
> configured state where some external IRQs are not registered. This
> causes enable_irq()/disable_irq()/free_irq() to be called on
> unregistered IRQs during runtime and remove/shutdown, triggering
> WARN_ON(!desc->action), and missing interrupt handlers lead to data
> loss.
>
> Additionally, if alloc_netdev_dummy() fails for a later IRQ group, the
> function returns -ENOMEM without freeing the ext IRQs and napi_ndev
> that were successfully set up for earlier groups.
>
> Fix all three issues: propagate the error up to the caller and unwind
> all successfully registered IRQs and allocated resources on failure.
>
> Signed-off-by: ZhaoJinming <zhaojinming@uniontech.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
next prev parent reply other threads:[~2026-07-21 7:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 2:56 [PATCH] wifi: ath11k: fix resource leak on error in ext IRQ setup ZhaoJinming
2026-07-13 5:33 ` Baochen Qiang
2026-07-13 10:59 ` [PATCH v2] " ZhaoJinming
2026-07-15 3:15 ` Baochen Qiang
2026-07-16 11:46 ` [PATCH v3] " ZhaoJinming
2026-07-17 3:47 ` Baochen Qiang
2026-07-21 7:21 ` [PATCH v4] " ZhaoJinming
2026-07-21 7:40 ` Baochen Qiang [this message]
2026-07-21 14:05 ` Jeff Johnson
2026-07-23 1:12 ` 赵金明
2026-08-05 18:29 ` [PATCH] " kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-07-22 9:54 [PATCH v4] " ZhaoJinming
2026-07-23 1:27 ` Jeff Johnson
2026-07-23 1:46 ` 赵金明
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ef27e6d-4313-4655-b166-987185e67ae3@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zhaojinming@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox