From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D43582D5A19; Mon, 13 Apr 2026 16:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776098447; cv=none; b=guGK8UaZP7g6/qIRWnBLVLl1bsh1MLoAJZvIwXc1OBAt/jxOX4Ued9iEh9I+W7ifMin6A/yeKPsR1QopStQniRc/T4wsr/cv1Ue/DvnXytHTveAhsXZQ28iA7eQIMPPA4iUOwh9lMygfsjcmwW7i4NUENmZvynLwyyUlf+zlR2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776098447; c=relaxed/simple; bh=VMvADTCspQ7EEGsKs24b6vQbhBw421zGf1eTTqHyJ18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O5YEVtKWXxsP2vo9TTRxt7hMisFFypecCh8ZjAchL83gTSnnANUhLLrhaKa/BJDSQB89bZ1HDWLjHEXOq70LKf92v7slLeRg9o2nq0kbYJkQ3RVv8pfrHD4y7SIHUP0HrWDBD0zocKnow0zPM6ieRP6YDUO/D0y3ocExFZhZ+3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mHk8/dTi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mHk8/dTi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BF38C2BCAF; Mon, 13 Apr 2026 16:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776098447; bh=VMvADTCspQ7EEGsKs24b6vQbhBw421zGf1eTTqHyJ18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mHk8/dTiGkKRFtx+Sfx2DB0DuGrRALKq4ZNcPINs7cx79oTCe2mQA1c6QvbJ0eW7m AVWpV+sdWFZcJERcXhqdwPbuEiBQXV6+oe6Fqf1q38nxKt1fpNCb61QaAyU393hIL0 bTGgxAQ4PTdAY2FdPQonzE4I5fWcyLv+5EZqrF2k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Fourier , Arend van Spriel , Johannes Berg Subject: [PATCH 5.15 528/570] wifi: brcmsmac: Fix dma_free_coherent() size Date: Mon, 13 Apr 2026 18:00:59 +0200 Message-ID: <20260413155850.227231828@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155830.386096114@linuxfoundation.org> References: <20260413155830.386096114@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Fourier commit 12cd7632757a54ce586e36040210b1a738a0fc53 upstream. dma_alloc_consistent() may change the size to align it. The new size is saved in alloced. Change the free size to match the allocation size. Fixes: 5b435de0d786 ("net: wireless: add brcm80211 drivers") Cc: Signed-off-by: Thomas Fourier Acked-by: Arend van Spriel Link: https://patch.msgid.link/20260218130741.46566-3-fourier.thomas@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/dma.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/dma.c @@ -483,7 +483,7 @@ static void *dma_ringalloc(struct dma_in if (((desc_strtaddr + size - 1) & boundary) != (desc_strtaddr & boundary)) { *alignbits = dma_align_sizetobits(size); - dma_free_coherent(di->dmadev, size, va, *descpa); + dma_free_coherent(di->dmadev, *alloced, va, *descpa); va = dma_alloc_consistent(di, size, *alignbits, alloced, descpa); }