mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Thomas Fourier <fourier.thomas@gmail.com>
Cc: stable@vger.kernel.org, Jeff Johnson <jjohnson@kernel.org>,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	Govind Singh <govinds@qti.qualcomm.com>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer
Date: Tue, 6 Jan 2026 10:55:20 +0800	[thread overview]
Message-ID: <ccba2a0b-3312-4a49-8de3-1601fa95d10f@oss.qualcomm.com> (raw)
In-Reply-To: <20260105210439.20131-2-fourier.thomas@gmail.com>



On 1/6/2026 5:04 AM, Thomas Fourier wrote:
> dma_alloc_coherent() allocates a DMA mapped buffer and stores the
> addresses in XXX_unaligned fields.  Those should be reused when freeing
> the buffer rather than the aligned addresses.
> 
> Fixes: 2a1e1ad3fd37 ("ath10k: Add support for 64 bit ce descriptor")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>

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

> ---
>  drivers/net/wireless/ath/ath10k/ce.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
> index 7bbda46cfd93..82f120ee1c66 100644
> --- a/drivers/net/wireless/ath/ath10k/ce.c
> +++ b/drivers/net/wireless/ath/ath10k/ce.c
> @@ -1727,8 +1727,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
>  				  (ce_state->src_ring->nentries *
>  				   sizeof(struct ce_desc) +
>  				   CE_DESC_RING_ALIGN),
> -				  ce_state->src_ring->base_addr_owner_space,
> -				  ce_state->src_ring->base_addr_ce_space);
> +				  ce_state->src_ring->base_addr_owner_space_unaligned,
> +				  ce_state->src_ring->base_addr_ce_space_unaligned);
>  		kfree(ce_state->src_ring);
>  	}
>  
> @@ -1737,8 +1737,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
>  				  (ce_state->dest_ring->nentries *
>  				   sizeof(struct ce_desc) +
>  				   CE_DESC_RING_ALIGN),
> -				  ce_state->dest_ring->base_addr_owner_space,
> -				  ce_state->dest_ring->base_addr_ce_space);
> +				  ce_state->dest_ring->base_addr_owner_space_unaligned,
> +				  ce_state->dest_ring->base_addr_ce_space_unaligned);
>  		kfree(ce_state->dest_ring);
>  	}
>  
> @@ -1758,8 +1758,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
>  				  (ce_state->src_ring->nentries *
>  				   sizeof(struct ce_desc_64) +
>  				   CE_DESC_RING_ALIGN),
> -				  ce_state->src_ring->base_addr_owner_space,
> -				  ce_state->src_ring->base_addr_ce_space);
> +				  ce_state->src_ring->base_addr_owner_space_unaligned,
> +				  ce_state->src_ring->base_addr_ce_space_unaligned);
>  		kfree(ce_state->src_ring);
>  	}
>  
> @@ -1768,8 +1768,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
>  				  (ce_state->dest_ring->nentries *
>  				   sizeof(struct ce_desc_64) +
>  				   CE_DESC_RING_ALIGN),
> -				  ce_state->dest_ring->base_addr_owner_space,
> -				  ce_state->dest_ring->base_addr_ce_space);
> +				  ce_state->dest_ring->base_addr_owner_space_unaligned,
> +				  ce_state->dest_ring->base_addr_ce_space_unaligned);
>  		kfree(ce_state->dest_ring);
>  	}
>  

seems ath12k has the same issue, would you like to fix it as well?



  reply	other threads:[~2026-01-06  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 21:04 Thomas Fourier
2026-01-06  2:55 ` Baochen Qiang [this message]
2026-01-09 15:45 ` 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=ccba2a0b-3312-4a49-8de3-1601fa95d10f@oss.qualcomm.com \
    --to=baochen.qiang@oss.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=fourier.thomas@gmail.com \
    --cc=govinds@qti.qualcomm.com \
    --cc=jjohnson@kernel.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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®