From: Kalle Valo <kvalo@kernel.org>
To: Baochen Qiang <quic_bqiang@quicinc.com>
Cc: <ath12k@lists.infradead.org>, <linux-wireless@vger.kernel.org>,
<quic_bqiang@quicinc.com>
Subject: Re: [PATCH] wifi: ath12k: check M3 buffer size as well whey trying to reuse it
Date: Tue, 30 Apr 2024 13:34:12 +0000 (UTC) [thread overview]
Message-ID: <171448405111.313333.6267220944906708635.kvalo@kernel.org> (raw)
In-Reply-To: <20240425021740.29221-1-quic_bqiang@quicinc.com>
Baochen Qiang <quic_bqiang@quicinc.com> wrote:
> Currently in recovery/resume cases, we do not free M3 buffer but
> instead will reuse it. This is done by checking m3_mem->vaddr: if it
> is not NULL we believe M3 buffer is ready and go ahead to reuse it.
>
> Note that m3_mem->size is not checked. This is safe for now because
> currently M3 reuse logic only gets executed in recovery/resume cases
> and the size keeps unchanged in either of them.
>
> However ideally the size should be checked as well, to make the code
> safer. So add the check there. Now if that check fails, free old M3
> buffer and reallocate a new one.
>
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
>
> Fixes: 303c017821d8 ("wifi: ath12k: fix kernel crash during resume")
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
05090ae82f44 wifi: ath12k: check M3 buffer size as well whey trying to reuse it
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240425021740.29221-1-quic_bqiang@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2024-04-30 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 2:17 [PATCH] wifi: ath12k: check M3 buffer size as well whey trying to reuse it Baochen Qiang
2024-04-25 17:05 ` Jeff Johnson
2024-04-30 13:34 ` 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=171448405111.313333.6267220944906708635.kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_bqiang@quicinc.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).