From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: Gaole Zhang <gaole.zhang@oss.qualcomm.com>,
ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Cc: miaoqing.pan@oss.qualcomm.com, hangtian.zhu@oss.qualcomm.com
Subject: Re: [ath-current] wifi: ath11k: fix NULL pointer dereference in ath11k_hal_srng_access_begin
Date: Wed, 10 Jun 2026 11:16:54 +0530 [thread overview]
Message-ID: <cc9185b4-741b-4232-8907-a85872c3cf59@oss.qualcomm.com> (raw)
In-Reply-To: <20260609090609.4041009-1-gaole.zhang@oss.qualcomm.com>
On 6/9/2026 2:36 PM, Gaole Zhang wrote:
> In ATH11K_QMI_EVENT_FW_READY, ATH11K_FLAG_REGISTERED is set
> unconditionally even when ath11k_core_qmi_firmware_ready() fails.
> This leaves the driver in an inconsistent state where
> initialization is considered complete although the firmware ready
> handling did not finish successfully. During the subsequent SSR,
> the driver enters the restart path based on this incorrect state
> and dereferences uninitialized srng members, resulting in a NULL
> pointer dereference.
>
> Call trace:
> ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] (P)
> ath11k_ce_cleanup_pipes+0x17c/0x180 [ath11k]
> ath11k_core_restart+0x40/0x168 [ath11k]
>
> Fix this by:
> - skipping firmware_ready if ATH11K_FLAG_REGISTERED is already set
> - setting ATH11K_FLAG_REGISTERED only when firmware_ready succeeds
> - setting ATH11K_FLAG_QMI_FAIL and aborting the FW_READY handling
> on error
>
> Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1
>
> Fixes: 6fe62a8cec51c ("wifi: ath11k: Add cold boot calibration support on WCN6750")
> Signed-off-by: Gaole Zhang <gaole.zhang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
next prev parent reply other threads:[~2026-06-10 5:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 9:06 [ath-current] wifi: ath11k: fix NULL pointer dereference in ath11k_hal_srng_access_begin Gaole Zhang
2026-06-10 5:46 ` Rameshkumar Sundaram [this message]
2026-06-10 6:12 ` Baochen Qiang
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=cc9185b4-741b-4232-8907-a85872c3cf59@oss.qualcomm.com \
--to=rameshkumar.sundaram@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=gaole.zhang@oss.qualcomm.com \
--cc=hangtian.zhu@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=miaoqing.pan@oss.qualcomm.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