From: Brian Norris <briannorris@chromium.org>
To: Albert Esteve <aesteve@redhat.com>
Cc: Jeff Johnson <jjohnson@kernel.org>, Kalle Valo <kvalo@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Govind Singh <govinds@codeaurora.org>,
Niklas Cassel <niklas.cassel@linaro.org>,
linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ath10k: clear QMI if failed during init
Date: Tue, 15 Sep 2026 10:26:31 -0700 [thread overview]
Message-ID: <aql_xwEy5POcVmyU@google.com> (raw)
In-Reply-To: <20260914-fix-ath10k-dangling-v1-1-15c5089682b1@redhat.com>
On Mon, Sep 14, 2026 at 03:05:19PM +0200, Albert Esteve wrote:
> A failed ath10k_qmi_init() left a dangling
> pointer (ar_snoc->qmi) in the cleanup path.
> Clear the pointer on the way out for hygiene
> and consistency with deinit().
>
> Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
It's all going away (probe failure / removal) if we get here anyway, so
this hardly qualifies as a "fix". In fact, in a cursory check of the
driver, it seems the NULL-ability of the ar_snoc->qmi field is totally
irrelevant to this driver -- it never is actually checked.
I suppose you can still call it "hygiene" though, and it's probably
reasonable to do the same here as we do in deinit().
> Signed-off-by: Albert Esteve <aesteve@redhat.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
> ---
> drivers/net/wireless/ath/ath10k/qmi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
> index 0d74548a5f34..08a64f737fb4 100644
> --- a/drivers/net/wireless/ath/ath10k/qmi.c
> +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> @@ -1128,6 +1128,7 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
>
> err:
> kfree(qmi);
> + ar_snoc->qmi = NULL;
> return ret;
> }
>
>
> ---
> base-commit: bc35965f6940a9bf834d54187b6088b8eb09206d
> change-id: 20260914-fix-ath10k-dangling-15676d427cbb
>
> Best regards,
> --
> Albert Esteve <aesteve@redhat.com>
>
next prev parent reply other threads:[~2026-09-15 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 13:05 Albert Esteve
2026-09-15 17:26 ` Brian Norris [this message]
2026-09-16 6:55 ` Albert Esteve
2026-09-16 15:05 ` Jeff Johnson
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=aql_xwEy5POcVmyU@google.com \
--to=briannorris@chromium.org \
--cc=aesteve@redhat.com \
--cc=andersson@kernel.org \
--cc=ath10k@lists.infradead.org \
--cc=govinds@codeaurora.org \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
/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
all inboxes | Powered by JetHome®