Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10479065rwp; Thu, 20 Jul 2023 23:02:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlGKBelt6H/rByDuWmQxsxUBvQ4SPAs4B9/kyeyNkUAPUq1wrZV5BiwyV/yKdjPBg5hMldo9 X-Received: by 2002:ac2:5e3a:0:b0:4f9:6c44:1bf3 with SMTP id o26-20020ac25e3a000000b004f96c441bf3mr477487lfg.62.1689919372473; Thu, 20 Jul 2023 23:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689919372; cv=none; d=google.com; s=arc-20160816; b=Gxrl70rklAGvIJxi9+sWtqth6ctmdrI1GMNqCHVyZLd4+wDaaRBBam6+pEYgZp0oKo UjHeeyjqbIKEbYkuR39IUI9wuzKBVHqJUQwGD70HyUb/DiSkod9I65r2Iu12ZW/r9l32 u06H5cl/WVUgKT+Unq/yeLZIsHaOA47WugrrFFaWew5fTBw+VNqYMrRNDeZ3PwBuHCcb vIJmUVxj9xDctD1Pt868UlMrErt3IxjLAsGnhJwQECxFz3SSi2iVle7Nvnngb+qyAmVG 7XmXF7g6YCLeISRBrOVMoN0zyTimv0niflVK5TgEPAGkB/NDz+utT+FYWFDeV9IpWpzx IiDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VTwSNz8UzpZ0VbH7nHekqHXggX9pRSKZTyzvOZzKjZI=; fh=239N9TPK33Qn7ha+Q0sQ3fNhJmIROSC7xWfxOgJDZ+k=; b=uIk6nO0b3A0TPpkHKT3gfbkOL+GgldgS4rwt9dbtG0QEdY6RgDOz2SxM4SJIiSBADB 8GzSII20ZvZyAJK72nHnrhUsrBnD5NpKDabfC2o4V2YOuLVKynq+XU5tJJi9MKqEHSyc gYKQ4ExpRWt0vMkKFEMLXMUYswgW+oU8Bp5i27MAy0yCw3gJH2tz4+mwjTBWMDno918s ui0Sis1zS0rllNiKcF0iq80hJNCdgfuRRfzieIeKmoEPIlqmwbEM1NNCwTi3lTBP9i6p WdPGToxkCBtr2qKHcATeqc7pMqWvZt1kYo1jdW7uc50FDvl0MHLEvravihYgib/fnoTQ AWZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=a7gEsdsZ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n28-20020a056402515c00b0051ddf3cc9e1si1827338edd.609.2023.07.20.23.02.13; Thu, 20 Jul 2023 23:02:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=a7gEsdsZ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229643AbjGUFyG (ORCPT + 58 others); Fri, 21 Jul 2023 01:54:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbjGUFxd (ORCPT ); Fri, 21 Jul 2023 01:53:33 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DA0E30F5 for ; Thu, 20 Jul 2023 22:53:30 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36L56UIC005676; Fri, 21 Jul 2023 05:53:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=VTwSNz8UzpZ0VbH7nHekqHXggX9pRSKZTyzvOZzKjZI=; b=a7gEsdsZezaiIvs5IdWbE6ukQADotXFcyzPQfSEMizF+Cxywl/FyBX7w7pOUuot9UWVo mvi90iWsgofRj8t9Kzqomtk3PGaYbQv2O1NzOTRooCDwK4fYYKkL7ET5WKGR5QKGx4cq h7CV7MzH+plXZzQg8IqknTX71q9kd2de223hlz+Y9fmNwtAWzWdHp0nFbqfwfNGsTNg6 27EHczM9WaWh9f+lXWBFZvzDOB1mOwcxJILDldRMSMJS61RO2uoeyrJ+gBck7EKp5FMu cVi1EEuGMlRPrpWsmYXtfD4uBNfipt1QkIHTTOIxkGl+7a7BmQoNv7iaxA88i6IHbPi7 Iw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rxpyqunfe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 05:53:26 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36L5rOYl030475 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 05:53:24 GMT Received: from wgong-HP3-Z230-SFF-Workstation.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Thu, 20 Jul 2023 22:53:23 -0700 From: Wen Gong To: CC: , Subject: [PATCH v2 3/3] wifi: ath12k: fix invalid m3 buffer address Date: Fri, 21 Jul 2023 01:53:05 -0400 Message-ID: <20230721055305.20420-4-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230721055305.20420-1-quic_wgong@quicinc.com> References: <20230721055305.20420-1-quic_wgong@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: HM8_rx67pTHS7w-S79YuzQyRReR09u8r X-Proofpoint-ORIG-GUID: HM8_rx67pTHS7w-S79YuzQyRReR09u8r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-21_02,2023-07-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=803 malwarescore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 bulkscore=0 spamscore=0 priorityscore=1501 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307210052 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is to fix m3 buffer reuse issue as m3_mem->size isn't set to ZERO in free function, which leads invalid m3 downloading to firmware and firmware crashed. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath12k/qmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index d0da9b63a114..edc45d78b5d5 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2535,6 +2535,7 @@ static void ath12k_qmi_m3_free(struct ath12k_base *ab) dma_free_coherent(ab->dev, m3_mem->size, m3_mem->vaddr, m3_mem->paddr); m3_mem->vaddr = NULL; + m3_mem->size = 0; } static int ath12k_qmi_wlanfw_m3_info_send(struct ath12k_base *ab) -- 2.40.1