mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Mikhail Lobanov <m.lobanov@rosalinux.ru>, Kalle Valo <kvalo@kernel.org>
Cc: Jeff Johnson <jjohnson@kernel.org>,
	Govindaraj Saminathan <quic_gsamin@quicinc.com>,
	Miles Hu <milehu@codeaurora.org>,
	Sven Eckelmann <seckelmann@datto.com>,
	Rajkumar Manoharan <rmanohar@codeaurora.org>,
	John Crispin <john@phrozen.org>,
	linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
	linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] ath11k: modify null check logic in ath11k_ce_rx_post_pipe()
Date: Tue, 11 Aug 2026 10:24:46 +0800	[thread overview]
Message-ID: <802e92d2-b1be-4a0d-bb3c-93b9e510c9d5@oss.qualcomm.com> (raw)
In-Reply-To: <20240909150824.28195-1-m.lobanov@rosalinux.ru>



On 9/9/2024 11:08 PM, Mikhail Lobanov wrote:
> The previous logic in ath11k_ce_rx_post_pipe() incorrectly required both 
> dest_ring and status_ring to be NULL in order to exit the function. 
> This caused the function to continue even if only one of the pointers 
> was NULL, potentially leading to null pointer dereferences in 
> ath11k_ce_rx_buf_enqueue_pipe().
> 
> Fix the condition by modifying the logic so that the function returns 
> early if either dest_ring or status_ring is NULL.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
> ---
>  drivers/net/wireless/ath/ath11k/ce.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c
> index e66e86bdec20..9d4246d65d68 100644
> --- a/drivers/net/wireless/ath/ath11k/ce.c
> +++ b/drivers/net/wireless/ath/ath11k/ce.c
> @@ -324,7 +324,7 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe)
>  	dma_addr_t paddr;
>  	int ret = 0;
>  
> -	if (!(pipe->dest_ring || pipe->status_ring))
> +	if (!pipe->dest_ring || !pipe->status_ring)
>  		return 0;
>  
>  	spin_lock_bh(&ab->ce.ce_lock);

Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>

  parent reply	other threads:[~2026-08-11  2:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 15:08 Mikhail Lobanov
2024-09-19 16:46 ` Kalle Valo
2024-09-19 19:42   ` Jeff Johnson
2026-08-04 16:27 ` Rameshkumar Sundaram
2026-08-11  2:24 ` Baochen Qiang [this message]
2026-09-09 17:57 ` 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=802e92d2-b1be-4a0d-bb3c-93b9e510c9d5@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath11k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=john@phrozen.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=m.lobanov@rosalinux.ru \
    --cc=milehu@codeaurora.org \
    --cc=quic_gsamin@quicinc.com \
    --cc=rmanohar@codeaurora.org \
    --cc=seckelmann@datto.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

all inboxes | Powered by JetHome®