* [PATCH] ath10k: clear QMI if failed during init
@ 2026-09-14 13:05 Albert Esteve
2026-09-15 17:26 ` Brian Norris
0 siblings, 1 reply; 4+ messages in thread
From: Albert Esteve @ 2026-09-14 13:05 UTC (permalink / raw)
To: Jeff Johnson, Kalle Valo, Bjorn Andersson, Govind Singh,
Brian Norris, Niklas Cassel
Cc: linux-wireless, ath10k, linux-kernel, Albert Esteve
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")
Signed-off-by: Albert Esteve <aesteve@redhat.com>
---
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: clear QMI if failed during init
2026-09-14 13:05 [PATCH] ath10k: clear QMI if failed during init Albert Esteve
@ 2026-09-15 17:26 ` Brian Norris
2026-09-16 6:55 ` Albert Esteve
0 siblings, 1 reply; 4+ messages in thread
From: Brian Norris @ 2026-09-15 17:26 UTC (permalink / raw)
To: Albert Esteve
Cc: Jeff Johnson, Kalle Valo, Bjorn Andersson, Govind Singh,
Niklas Cassel, linux-wireless, ath10k, linux-kernel
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>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: clear QMI if failed during init
2026-09-15 17:26 ` Brian Norris
@ 2026-09-16 6:55 ` Albert Esteve
2026-09-16 15:05 ` Jeff Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Albert Esteve @ 2026-09-16 6:55 UTC (permalink / raw)
To: Brian Norris
Cc: Jeff Johnson, Kalle Valo, Bjorn Andersson, Govind Singh,
Niklas Cassel, linux-wireless, ath10k, linux-kernel
On Tue, Sep 15, 2026 at 7:26 PM Brian Norris <briannorris@chromium.org> wrote:
>
> 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.
Yes, I agree...
>
> I suppose you can still call it "hygiene" though, and it's probably
> reasonable to do the same here as we do in deinit().
... that's why I phrased the patch body that way. I hesitated about
using the Fixes tag here. I can send a follow-up removing the tag if
you'd prefer.
BR,
Albert
>
> > 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>
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: clear QMI if failed during init
2026-09-16 6:55 ` Albert Esteve
@ 2026-09-16 15:05 ` Jeff Johnson
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnson @ 2026-09-16 15:05 UTC (permalink / raw)
To: Albert Esteve, Brian Norris
Cc: Jeff Johnson, Bjorn Andersson, Niklas Cassel, linux-wireless,
ath10k, linux-kernel
On 9/15/2026 11:55 PM, Albert Esteve wrote:
> On Tue, Sep 15, 2026 at 7:26 PM Brian Norris <briannorris@chromium.org> wrote:
>>
>> 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.
>
> Yes, I agree...
>
>>
>> I suppose you can still call it "hygiene" though, and it's probably
>> reasonable to do the same here as we do in deinit().
>
> ... that's why I phrased the patch body that way. I hesitated about
> using the Fixes tag here. I can send a follow-up removing the tag if
> you'd prefer.
no need to repost. I'll drop the Fixes tag, update the subject to add the
missing wifi: prefix, and edit/re-flow the commit text to use the 70+ columns
that is preferred when I take it into my pending tree.
/jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-16 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 13:05 [PATCH] ath10k: clear QMI if failed during init Albert Esteve
2026-09-15 17:26 ` Brian Norris
2026-09-16 6:55 ` Albert Esteve
2026-09-16 15:05 ` 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®