All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Kalle Valo" <quic_kvalo@quicinc.com>,
	"Tetsuo Handa" <penguin-kernel@i-love.sakura.ne.jp>,
	linux-wireless@vger.kernel.org,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Ubisectech Sirius" <bugreport@ubisectech.com>
Subject: Re: [PATCH] wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete
Date: Fri,  2 Feb 2024 11:40:06 +0000 (UTC)	[thread overview]
Message-ID: <170687400420.3200018.14639804341103572305.kvalo@kernel.org> (raw)
In-Reply-To: <20240126140218.1033443-1-toke@toke.dk>

Toke Høiland-Jørgensen <toke@toke.dk> wrote:

> The ath9k_wmi_event_tasklet() used in ath9k_htc assumes that all the data
> structures have been fully initialised by the time it runs. However, because of
> the order in which things are initialised, this is not guaranteed to be the
> case, because the device is exposed to the USB subsystem before the ath9k driver
> initialisation is completed.
> 
> We already committed a partial fix for this in commit:
> 8b3046abc99e ("ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()")
> 
> However, that commit only aborted the WMI_TXSTATUS_EVENTID command in the event
> tasklet, pairing it with an "initialisation complete" bit in the TX struct. It
> seems syzbot managed to trigger the race for one of the other commands as well,
> so let's just move the existing synchronisation bit to cover the whole
> tasklet (setting it at the end of ath9k_htc_probe_device() instead of inside
> ath9k_tx_init()).
> 
> Link: https://lore.kernel.org/r/ed1d2c66-1193-4c81-9542-d514c29ba8b8.bugreport@ubisectech.com
> Fixes: 8b3046abc99e ("ath9k_htc: fix NULL pointer dereference at ath9k_htc_tx_get_packet()")
> Reported-by: Ubisectech Sirius <bugreport@ubisectech.com>
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

24355fcb0d4c wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240126140218.1033443-1-toke@toke.dk/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      reply	other threads:[~2024-02-02 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 14:02 [PATCH] wifi: ath9k: delay all of ath9k_wmi_event_tasklet() until init is complete Toke Høiland-Jørgensen
2024-02-02 11:40 ` Kalle Valo [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=170687400420.3200018.14639804341103572305.kvalo@kernel.org \
    --to=kvalo@kernel.org \
    --cc=bugreport@ubisectech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=quic_kvalo@quicinc.com \
    --cc=toke@redhat.com \
    --cc=toke@toke.dk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.