Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp167165lqb; Thu, 14 Mar 2024 08:09:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtHqz25T9/SKO+BewOlWTbS8qZ9EeNEpW4zChlmCM2TXzTixKkszdemun9xtnFL9L8yDLpkdu0feFLesPrHmj9AuZij2OqNAFeEMCuHA== X-Google-Smtp-Source: AGHT+IG2iIJr8hkJ7mAwEn649f3lgLidNF+l52ehQ8y1ScN5B4gbA+7ZRDFgR/eWEDI9X7dtm69z X-Received: by 2002:a17:902:c412:b0:1dd:76f0:4455 with SMTP id k18-20020a170902c41200b001dd76f04455mr2263054plk.49.1710428949993; Thu, 14 Mar 2024 08:09:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710428949; cv=pass; d=google.com; s=arc-20160816; b=VSUZOzfYnU29hee0wdhC62+M143RFmEFj8aOqCOaweQbi4L9ApHM4d4FWketEd1Vob VVZNCQ38TmXTLbrGjcWIafwh0ZQ6ElE1zCF85BcAX4uIFx52fNrvWj3LBgo30NqnzGBE quPWM2Imnp9Hi5brs+lVIKIgJR1RtN0OvrRqLa9PtPFDdJpO+RidrRaJW+7olyGMjeav WKs0zX0pOggVDH3R2AeEv/mJ2ztCupVSRFZu4NWRenLJvHdtW+hDodkOvhG/s7D2/CqJ LuKWCsnlp01xGu025qi7DPNoZdheMJdSzRAWqRNWf3eEFl9RAS9K3HAtfwvcKvO+PNag ulog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=J4W3RTEmNxYpcH32NJfuCdJa8JlrK6HFykT4ITaYflQ=; fh=MpQkIlabQhYMmR6FRuOahFsR7o/FfBLh83HQeeU8xdE=; b=KpwohCKudJsySHlFzlTUag6DEUdVOA99kjB6BNSYqSewYz9wCFfdFVvctmmdeq+8r4 1zcksuKjYJ3+wudAtQV0FyjBxhGS7tV/yZg35Ob4nK9FxSwjM9VLiPx7JwsDNI6m6r2u 7zbqaxDIk0K1Q2BnWYTGPZRe4BzuQSNsEqXNFBFg8AtWfiE+m3eiDYq+xd9bThOvQv+/ RvQNN1pV5ShbEkpkjBX+5Ex71bsKMTrm9zszuDWSnhf33R5mLkfgDvXdyW7OPvWXis67 JGjDYtycGqRZzqTOvgc2XVEs4BkF1F/2diE6RImRic0yNtJX4i20HZFAOWW5340Fy+FZ erXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ji0A/bQe"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4752-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l1-20020a170903244100b001dca282000dsi1654340pls.433.2024.03.14.08.09.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 08:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4752-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ji0A/bQe"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4752-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4752-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 729EA281F44 for ; Thu, 14 Mar 2024 15:09:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA45671738; Thu, 14 Mar 2024 15:09:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ji0A/bQe" X-Original-To: linux-wireless@vger.kernel.org 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 35656DDD9 for ; Thu, 14 Mar 2024 15:09:04 +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=1710428946; cv=none; b=gGsY/cQtZNH9JXvDbnMwVJio+tgk9Sosn6ZTgmtsPN59ucKp3DGI3WMQuFc6MrTmYZfcUOrUXUnDA/2Q5gq2NMD2BNNeP+DZHWVdXxDkmhzVqZaslTnp/PfWO6Uhsxg+pu/RqOwhhIh7L2kVyI5RsI0PSshFNNuTsnFxhacBUUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710428946; c=relaxed/simple; bh=9APMwM3wiUi55+KJ9Q0//+XZJGAdFLPIhRPM3kGR9fE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=PeyNo5EcqSlKvztXQ9SivpejZck1M9CjkNLWJnlic3flQNQXWB2ssj/Zx8b6We0gq0nBkUuB03E2fLQ4RLZx3aznRrQnp/KB4QCNCuZ5ZYGrKHbW1IbzgMrWPe0VgkuhWI04voF0MON7Wz3dfHeOJaiRZxbkoCy3paIxE2LXQ14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ji0A/bQe; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42EBt958013078; Thu, 14 Mar 2024 15:08:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=J4W3RTEmNxYpcH32NJfuCdJa8JlrK6HFykT4ITaYflQ=; b=ji 0A/bQevxLLK33mX2iZHVwskuxiVW7dd7z4dQFVxEpTIsl7uQLSc2otZGo3GQEDN2 TiAvyGUDLV33wUbM4sSe6drPinQ4JYmZ78dv27FBuu3AK9RU+Xwmsc8vt6pcYnq2 xNuLLjMr2X5vP2m4aYQILm885BNLZt11o95kFLCJ9vBPWmL6/JFP49WEdcTqEkRa yHtnjSr67cCwXPsFHLDYIvxEzcuF4znHwX1LXnBvUu/FfJ3zeXzHh27HDPtCz55e dosqoEQOSe7VL64Hi5G3igcFLXC+eEEy8GyWQFt1A34nv7xmC2JoSsEilxKDtywf BoI+szSCXaJszqAO0scg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wuy3y8n16-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 15:08:59 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42EF8wYD011667 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 15:08:58 GMT Received: from [10.110.27.195] (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.40; Thu, 14 Mar 2024 08:08:57 -0700 Message-ID: <2f94602e-5e77-4e79-b6f1-5612133a31ba@quicinc.com> Date: Thu, 14 Mar 2024 08:08:57 -0700 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath12k: fix memory leak in ath12k_pci_remove() Content-Language: en-US To: Miaoqing Pan , CC: , References: <20240314012746.2729101-1-quic_miaoqing@quicinc.com> From: Jeff Johnson In-Reply-To: <20240314012746.2729101-1-quic_miaoqing@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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: 3WbC36bjTIToziWwH-XPMLxiniBBamNX X-Proofpoint-ORIG-GUID: 3WbC36bjTIToziWwH-XPMLxiniBBamNX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_12,2024-03-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 bulkscore=0 mlxscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=785 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403140112 On 3/13/2024 6:27 PM, Miaoqing Pan wrote: > Kmemleak reported this error: > > unreferenced object 0xffff1c165cec3060 (size 32): > comm "insmod", pid 560, jiffies 4296964570 (age 235.596s) > backtrace: > [<000000005434db68>] __kmem_cache_alloc_node+0x1f4/0x2c0 > [<000000001203b155>] kmalloc_trace+0x40/0x88 > [<0000000028adc9c8>] _request_firmware+0xb8/0x608 > [<00000000cad1aef7>] firmware_request_nowarn+0x50/0x80 > [<000000005011a682>] local_pci_probe+0x48/0xd0 > [<00000000077cd295>] pci_device_probe+0xb4/0x200 > [<0000000087184c94>] really_probe+0x150/0x2c0 > > The firmware memory was allocated in ath12k_pci_probe(), but not > freed in ath12k_pci_remove() in case ATH12K_FLAG_QMI_FAIL bit is > set. So call ath12k_fw_unmap() to free the memory. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.2.0-02280-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 > > Signed-off-by: Miaoqing Pan Acked-by: Jeff Johnson