Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8997668rwp; Wed, 19 Jul 2023 20:15:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlECXFY+nuYl331hCnqcE2YiT/sx6hhUBe+TuazBSoO9AMqquzvbfapBnsjn8mvvjT75TIxa X-Received: by 2002:a17:906:51:b0:993:f540:5bb1 with SMTP id 17-20020a170906005100b00993f5405bb1mr3739911ejg.41.1689822928362; Wed, 19 Jul 2023 20:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689822928; cv=none; d=google.com; s=arc-20160816; b=RI9YbEB+QpIbPTlGdTqAUKwPAMbcRDIwdCdOLBf99OJhwPtEgbtlOab7acJkGgYgiu dLPTHgTa9jT8Hf9rWd0FljOebKz3cVYPaRour1AIKkGArILgSPuFKVMUQbdO8GnjGbCl fWHB70aYDJZMaeG/ml4WfbjkRywL0J+VZVi7SzBqnPM3P2wPAFHHftfrincPe6x1Dmji jSo/mbg3uIsa5TLxDcm/Fpo5gFGM8BmCu1bmdiqWEqmN3M4w3lXel94ooNFV3UuSlGnH LuNCtLA/tsY1cjV5hIms7mELUnXJUsJg3k6L7aDp9Eorjupe+ffeAyANl4wnrdDW63aN Jnag== 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=oExKh3CxRyYF4PuUjQrfXQhztoBQ5Kc7QepoYyLi/w2PwSUsVP/OPAJ7Mrw4+FIfu5 nBANwGPpGUkZvjKs7lv1hYBL6glrjAaXrQ8fIxJVXUUsyESa0lw3E3FXUZ2of6NtEzA+ pi/asEVD2gx6VQLHeskoOtNlEAoF7hOuIthVRN544P9a/Uz/1myrtRVwIr5IdGZpF++i 3nEAXMwoO+ilQVF1WctacoNgT4be2a3D1lD1JEnwlVfQRva8ehnptsKuhxNcf8dAkuqK PU+hsBGIn50hPsbqBUWTbMs/ilmDZ9AfC18jLYT675fDO79X4cjdhy5yeTutHnSrdqC5 /CdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AOg3NhiH; 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 md17-20020a170906ae9100b0098e3591d105si12933ejb.405.2023.07.19.20.15.13; Wed, 19 Jul 2023 20:15:28 -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=AOg3NhiH; 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 S229536AbjGTCxB (ORCPT + 58 others); Wed, 19 Jul 2023 22:53:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjGTCw5 (ORCPT ); Wed, 19 Jul 2023 22:52:57 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD1191985 for ; Wed, 19 Jul 2023 19:52:56 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36K2EK30011108; Thu, 20 Jul 2023 02:52:52 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=AOg3NhiHPvbn4OUmxSGpCZ9yIZUyuxtfLNi9F20NYQSyfP67jOrW46DetO+BOv7fomAI w4VuOo8rO1bLLtUv4lwJqudoG5JVWYmv0GePNa5VMncsmaay6PF9u/NJLtzj55Jl2Ovz seO72xP2/XKbXvi/9pbbGY+Xh7QD+srI/AWr3dUFn5NHBOTZeO4aHhAYu8BRTOmdQXLq 6PHT15RL+8PRsnmBqF8Cu3a26SeEigNfrVEtOIbj+m7hsFOaaRpV+IMyQK0yXA9j8q2J pBkR1eOEyetDhb4TfA0yDYjJLXIea348d0EdVeK0r4F9D4I6peDNX4HhlTPYnLZw7ouF Vg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rx7412n4b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 02:52:52 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36K2qpIf006897 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Jul 2023 02:52:51 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; Wed, 19 Jul 2023 19:52:50 -0700 From: Wen Gong To: CC: , Subject: [PATCH 3/3] wifi: ath12k: fix invalid m3 buffer address Date: Wed, 19 Jul 2023 22:52:32 -0400 Message-ID: <20230720025232.7701-4-quic_wgong@quicinc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230720025232.7701-1-quic_wgong@quicinc.com> References: <20230720025232.7701-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: yKeYJh1f0jMgJRGee4lziw0TA3BzxT0M X-Proofpoint-ORIG-GUID: yKeYJh1f0jMgJRGee4lziw0TA3BzxT0M 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-19_16,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0 bulkscore=0 suspectscore=0 spamscore=0 priorityscore=1501 mlxlogscore=804 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307200020 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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