From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 DB27230DEB5 for ; Tue, 6 Jan 2026 10:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767693688; cv=none; b=n+ml4yijWrBBaeMaIr4ViLLarShV/BgtT2SyUxCRHJpoiuosCxvIxHByq4y78GQgPuE4YoJ0KULngVN8CXa146IXzWl19y78cLqe8ZwUDtJxOsqG367Vjzr6Jahk0D+GmEW2PB/SVPYPDJ+DU+gloyiiyW+UUzBS8c+edi4xpaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767693688; c=relaxed/simple; bh=TEtCtHsqRpP9qf3468gIVgZon8mhEIVv+VTFec6/RCM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CjqChBBgdcQeeaUkjzzOd6sKlbZ4nqY80nizkWul5PiHXDWRC/Wh/hr/tJ9r3mCWFbDso4P7+L1YAreCrI+OOkqI9g0MzNsYMYjsAD23UdoA8IM5N8xNuP+Y0GgzYIjQoQiulJzQXvRkvcN+9XqOXLJi3TIBe79cMu3vCZQi5cQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ciUsSU+h; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=iOD0pl56; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ciUsSU+h"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="iOD0pl56" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6063QFP83214179 for ; Tue, 6 Jan 2026 10:01:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= j4HKFWWo6W7gPbfh2tN5wFUcJzGeLsVtA756B0bDLos=; b=ciUsSU+hN0+irebs HeY9p2tv99RJ7fijeXMhdb03i+Pr8ewvCkXs3yXV4sN9eS/fXIAVIyqpJ/fcoDwI hvLWFX3k+mHxSr5KTqhYp3UPut5BTfaoJ6Il0P44Koqb/tI2KjZTjcJs+2dsUUwD qHmDN3LssnS3WyW3YyY/c5/jOtQ64UTMydaot83INJHV9LimEzroZIRDgvSWuJ4k 0VQ77N+VooGhc2G76dM2ycGCXSqQWZ7PeArFRApgaJG0Bu+banN8DacQp/aFt/UA 34oMH3DfjhmaA78rvZn74YwLg9aGtT/QlKymOrFakMClP+yT8Q3RLcrZjQEElecg thYQdg== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bgpnd9n7x-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 06 Jan 2026 10:01:24 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-7bad1cef9bcso1791662b3a.1 for ; Tue, 06 Jan 2026 02:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767693684; x=1768298484; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=j4HKFWWo6W7gPbfh2tN5wFUcJzGeLsVtA756B0bDLos=; b=iOD0pl567McJSTfkvz9vu3ib4KyK+b6jGG/AQJ2vlTMi1CsaeVx6UE5fwqWarNVSzQ 112z3lkbORQ8ycGXaJc4II70iDDyvE3bWhvVN/ym0BWrNJ/dBOlvbUFn/JxajyLuNjm3 BHwwxaFBiwOyMN2bF3qDWfkqAT3QtDWlon1mpEk6HlXoMjQ1zvEvmrGdwC5O2FsUcQGC ZzVALpIfl7p/QuvW6giOBS7wi7pkHtCmotTFES4FP1humAtmEvLBeuTh2+RQx9I+yAv+ +Nvpn3tKhPRE9ZbU6TONw8YjWLrB+TqfExflHhEz1N+xIEyRCTQWVfVzxa8JG4SlFvLC WbHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767693684; x=1768298484; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j4HKFWWo6W7gPbfh2tN5wFUcJzGeLsVtA756B0bDLos=; b=b4Y7oQZBcBOe9v9AQR634QkyXuifDZkFEDDDY6VlhPtqQCeqo9nBe7+q62lc/QA/4j SmhQL/q12hIHhzc75RgZoT65veIThgC3CgUydv0mFgTFaUsxPUnlfVOoqDWi+SktWOIq 15pnqTW0vibcgCYZRP0esl5AeGok8weBtyxLB9a1KnpH7yq7Ov+r9EfE45rouCcgK1pi 7RS9zjsZkdx2ChDVlfhbG46xCHC88bIsIHAWh+41OqbM5L8U547MXIFaGtM7YEMfrgMk 3stqyRrIdd6LY1ovetnGgnispx772ZDAzDLS9i3rqWoxjdjGsObtrfpFKH8WsiwcQLng m+Rg== X-Forwarded-Encrypted: i=1; AJvYcCV0haZukpsxu35WClZGs9TlElOvXm9Na2/t3SEURUr9VnbF2n1/AxL7l9xSqo3EwOiVL229AUECcQ1G+M4=@vger.kernel.org X-Gm-Message-State: AOJu0YwFoAUHFWbB/fU681B35N4aJ4uF5xO/dx/zLSGA76d3la6vlc0m f4vtSJUbqB7d/mUu4a++uYTVbHWzNYSvPPy5GuVXpwoeUHnn5HkWRenG5G5pXX29D+putIYXQgc AguyFBhdRjI1TsuraZ92LEfEaqgDd16BktZOYrPDunSObvqetDiXRGqWT1ZiYyN1s+sI= X-Gm-Gg: AY/fxX5U/p4jxL6C3hUR6oVug79dGIk43j7DlFfbxqcLUEVbeIuTlqXPmQODi9g47Ik gdgoxccv9vBBXPsFQDUiTw7XfW0a9xxOe8AFZzNHZTs6eXDxL9PQYE8FX9jySKhRWp5P/J7fruk MRLAja15WRZBnbHv/DqCyS+39o+JrZ9r14nyJbge/DUv/UKDdCG+ntJYwYOwm5+n9f/OZKOSepL uDezvcWvBqzUQm0l95BlUKfVZNJKUKdiSI5XHyEq35+LTEamHL47RsChJaHZVzDn7i4JuBBvGGO ay4goDlWW/m/tAbgckaNoJJgok+jCTtxI7PWDtW3VaUnS6wqbOasYKFu4N4lpnUSR3y+2GyAzlf YHEgXe8PaUawQTh0Zeo7FWjFdRwm40HcX+Wsizd33s0Uy0vGJjVf5sPkRty01jrJgm1cxMoaIou 6CXt+beA== X-Received: by 2002:a05:6a00:1c97:b0:809:33e7:5d89 with SMTP id d2e1a72fcca58-818832c940dmr2279583b3a.64.1767693683507; Tue, 06 Jan 2026 02:01:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpJVZcGU/yMmbSm8cCO+VvvqV91A5JT4ce5P4ZY5G0vL39xcSvsOISQdH6C11AWWGi918cYA== X-Received: by 2002:a05:6a00:1c97:b0:809:33e7:5d89 with SMTP id d2e1a72fcca58-818832c940dmr2279545b3a.64.1767693682930; Tue, 06 Jan 2026 02:01:22 -0800 (PST) Received: from [10.133.33.54] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-819c5301416sm1701367b3a.38.2026.01.06.02.01.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jan 2026 02:01:22 -0800 (PST) Message-ID: Date: Tue, 6 Jan 2026 18:01:18 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] wifi: ath12k: fix dma_free_coherent() pointer To: Thomas Fourier Cc: stable@vger.kernel.org, Jeff Johnson , Pradeep Kumar Chitrapu , Sriram R , Kalle Valo , Wen Gong , linux-wireless@vger.kernel.org, ath12k@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260106084905.18622-2-fourier.thomas@gmail.com> From: Baochen Qiang Content-Language: en-US In-Reply-To: <20260106084905.18622-2-fourier.thomas@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: mY9jcCM_SnO7z2koNW47vU2RNc3_W064 X-Proofpoint-GUID: mY9jcCM_SnO7z2koNW47vU2RNc3_W064 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTA2MDA4NSBTYWx0ZWRfXwK0GPn/QPPCH dxbqdbAXzuiwSmOthIo4uQtqUbAXivaZp9cR5CpXI4f1lbQBiF7pZFfgn6YeroANfwR0m/O8jD7 ESe4Sn0joOf7xpsoEB2CEVJVTyu/WMGMrONKLZ2QqSyndCVSei+ploAc3r/gOWmNaG3zHnHwKn2 UTwmv8PawtR2RLPnJRat5w1SAPgsGT4OlbEYF5P7TzJFmmlKobK1KmIfHFvFm5OOwRydvgHgRDJ qnUIP3fjo8lZ//oe+8bSAFd2Jq7mAtSCeHt6OVHno5GZO9saYwrcGyjoB/yMo4KYyvfRFWvSbu2 7FqDF51F56jtNNw5zqFbrko66ZEkWQakBuM8w18hibaYQIOUm473ZjK+ius3xZw8kODq+tCTwQH EmeAvfIL0M1gTWozHqzkUq6rEMG7QDJpkdMdw7Ur8+QAoyp1bvpq/N1i7Uhhx6QpVyYlxg6V1y1 iAZbdYxQ6j7XoQOC2lQ== X-Authority-Analysis: v=2.4 cv=Jpz8bc4C c=1 sm=1 tr=0 ts=695cdd74 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=MvB9iNEEFr4mKuRVMNwA:9 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-05_02,2026-01-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601060085 On 1/6/2026 4:49 PM, 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: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") > Cc: > Signed-off-by: Thomas Fourier > --- > drivers/net/wireless/ath/ath12k/ce.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath12k/ce.c b/drivers/net/wireless/ath/ath12k/ce.c > index 9a63608838ac..4aea58446838 100644 > --- a/drivers/net/wireless/ath/ath12k/ce.c > +++ b/drivers/net/wireless/ath/ath12k/ce.c > @@ -984,8 +984,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) > dma_free_coherent(ab->dev, > pipe->src_ring->nentries * desc_sz + > CE_DESC_RING_ALIGN, > - pipe->src_ring->base_addr_owner_space, > - pipe->src_ring->base_addr_ce_space); > + pipe->src_ring->base_addr_owner_space_unaligned, > + pipe->src_ring->base_addr_ce_space_unaligned); > kfree(pipe->src_ring); > pipe->src_ring = NULL; > } > @@ -995,8 +995,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) > dma_free_coherent(ab->dev, > pipe->dest_ring->nentries * desc_sz + > CE_DESC_RING_ALIGN, > - pipe->dest_ring->base_addr_owner_space, > - pipe->dest_ring->base_addr_ce_space); > + pipe->dest_ring->base_addr_owner_space_unaligned, > + pipe->dest_ring->base_addr_ce_space_unaligned); > kfree(pipe->dest_ring); > pipe->dest_ring = NULL; > } > @@ -1007,8 +1007,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab) > dma_free_coherent(ab->dev, > pipe->status_ring->nentries * desc_sz + > CE_DESC_RING_ALIGN, > - pipe->status_ring->base_addr_owner_space, > - pipe->status_ring->base_addr_ce_space); > + pipe->status_ring->base_addr_owner_space_unaligned, > + pipe->status_ring->base_addr_ce_space_unaligned); > kfree(pipe->status_ring); > pipe->status_ring = NULL; > } Reviewed-by: Baochen Qiang