Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: ath10k: fix dma_free_coherent() pointer

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>
Link: https://patch.msgid.link/20260105210439.20131-2-fourier.thomas@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>

authored by

Thomas Fourier and committed by
Jeff Johnson
9282a1e1 a203dbee

+8 -8
+8 -8
drivers/net/wireless/ath/ath10k/ce.c
··· 1727 1727 (ce_state->src_ring->nentries * 1728 1728 sizeof(struct ce_desc) + 1729 1729 CE_DESC_RING_ALIGN), 1730 - ce_state->src_ring->base_addr_owner_space, 1731 - ce_state->src_ring->base_addr_ce_space); 1730 + ce_state->src_ring->base_addr_owner_space_unaligned, 1731 + ce_state->src_ring->base_addr_ce_space_unaligned); 1732 1732 kfree(ce_state->src_ring); 1733 1733 } 1734 1734 ··· 1737 1737 (ce_state->dest_ring->nentries * 1738 1738 sizeof(struct ce_desc) + 1739 1739 CE_DESC_RING_ALIGN), 1740 - ce_state->dest_ring->base_addr_owner_space, 1741 - ce_state->dest_ring->base_addr_ce_space); 1740 + ce_state->dest_ring->base_addr_owner_space_unaligned, 1741 + ce_state->dest_ring->base_addr_ce_space_unaligned); 1742 1742 kfree(ce_state->dest_ring); 1743 1743 } 1744 1744 ··· 1758 1758 (ce_state->src_ring->nentries * 1759 1759 sizeof(struct ce_desc_64) + 1760 1760 CE_DESC_RING_ALIGN), 1761 - ce_state->src_ring->base_addr_owner_space, 1762 - ce_state->src_ring->base_addr_ce_space); 1761 + ce_state->src_ring->base_addr_owner_space_unaligned, 1762 + ce_state->src_ring->base_addr_ce_space_unaligned); 1763 1763 kfree(ce_state->src_ring); 1764 1764 } 1765 1765 ··· 1768 1768 (ce_state->dest_ring->nentries * 1769 1769 sizeof(struct ce_desc_64) + 1770 1770 CE_DESC_RING_ALIGN), 1771 - ce_state->dest_ring->base_addr_owner_space, 1772 - ce_state->dest_ring->base_addr_ce_space); 1771 + ce_state->dest_ring->base_addr_owner_space_unaligned, 1772 + ce_state->dest_ring->base_addr_ce_space_unaligned); 1773 1773 kfree(ce_state->dest_ring); 1774 1774 } 1775 1775