From: Ping-Ke Shih <pkshih@realtek.com>
To: Dawei Feng <dawei.feng@seu.edu.cn>
Cc: "leitao@debian.org" <leitao@debian.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jianhao.xu@seu.edu.cn" <jianhao.xu@seu.edu.cn>,
"zilin@seu.edu.cn" <zilin@seu.edu.cn>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH wireless] wifi: rtw88: pci: fix resource leak on failed NAPI setup
Date: Wed, 17 Jun 2026 08:33:43 +0000 [thread overview]
Message-ID: <459e4dfeb2f048c3bff97028d8c1f3a2@realtek.com> (raw)
In-Reply-To: <20260617013502.114057-1-dawei.feng@seu.edu.cn>
Dawei Feng <dawei.feng@seu.edu.cn> wrote:
> rtw_pci_probe() allocates PCI resources through
> rtw_pci_setup_resource() before it sets up NAPI. If
> rtw_pci_napi_init() fails, the error path jumps straight to
> err_pci_declaim and skips rtw_pci_destroy(), leaving the PCI
> resources allocated by rtw_pci_setup_resource() behind.
>
> Add a dedicated cleanup label for the NAPI setup failure path so probe
> destroys the PCI resources.
>
> The bug was first flagged by an experimental analysis tool we are
> developing for kernel memory-management bugs while analyzing current
> mainline kernels. The tool is still under development and is not yet
> publicly available. Manual inspection confirms that the bug is still
> present in v7.1-rc7.
>
> An x86_64 allyesconfig build showed no new warnings. As we do not have a
> suitable rtw88 PCI board to test with, no runtime testing was able to be
> performed.
>
> Fixes: d0bcb10e7b94 ("wifi: rtw88: Un-embed dummy device")
> Cc: stable@vger.kernel.org
> Signed-off-by: Dawei Feng <dawei.feng@seu.edu.cn>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
prev parent reply other threads:[~2026-06-17 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 1:35 [PATCH wireless] wifi: rtw88: pci: fix resource leak on failed NAPI setup Dawei Feng
2026-06-17 8:33 ` Ping-Ke Shih [this message]
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=459e4dfeb2f048c3bff97028d8c1f3a2@realtek.com \
--to=pkshih@realtek.com \
--cc=dawei.feng@seu.edu.cn \
--cc=jianhao.xu@seu.edu.cn \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=zilin@seu.edu.cn \
/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