Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp154029rwb; Thu, 17 Nov 2022 22:34:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf6RNO37AcJYIozxAYRJN4VbLMUrdOpuPRPPLqGo/JXGabYKC1DSCAx/vbylOvHZ7E3JL4EQ X-Received: by 2002:a63:ff17:0:b0:470:8f8d:eb51 with SMTP id k23-20020a63ff17000000b004708f8deb51mr5320401pgi.69.1668753297720; Thu, 17 Nov 2022 22:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668753297; cv=none; d=google.com; s=arc-20160816; b=EAbT96JAkKyycOnTowwAf5s103lCbjgC+gJReiYqaRTj+FL1GZhNoLgmQZbdyq8jmH vrlVzFVe5qvmwmGwZOdnThOvYZik+qcsoHBK83wVyvpLUNpFWwHr9cgkig3GnbRupR6c gVoE3SL1v66AZNK0TwjhOGrSMwy3tkikkcQfDR01GAWkO3/hyK46UUz+hslnhHSjMfG8 npd0Ledc79bNE6uLltQKzz11hvbM5wfmGnc/Llxs37jozEh00RvUvqYwrGOuFhlQLP7F rhweZoiN5M1m2dNhfX5NgOR3bgbYnK6pp8KqhrApreAH845Ua/WqoIXS0eTnKIzQiJ/4 280Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=rfPTK3Ws9DQIFMtDxP+2qA1OW8gCE5J/fBZtd5pmvzU=; b=OKeMQU5IV8pIe4xNfjaAAG9SfEt6UauDmO+NwhWtn4cpewk3yffvZNlIzrnmjf+bTL KX2aKLJBW6mIIn40EsL/bVWxDB4+KxGUWkInBoSchA9iHQgdhZZLTfTfMeXbnLuUcQ1M tXEMvkF/7y7LEwjOgQOs/p/VNt6uKFUeTHbFLubbfjKMS2r8Cr0qfvuqOrefxX8KB8LV 0AF4NI1oIBtM93CVE2mQQU6DHKgHuIvFJp7cQvMkHbnMzkug5wcZsR8FX/RM6eoH+AV0 hxmUIeHe9N5I5NLJwKh1fhgFoTMD1AIHtB6GX8keyoBhKKboPI1ZnIr8aNPQpjD4Wzyv SYoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a631d09000000b00476cd353910si3159584pgd.49.2022.11.17.22.34.46; Thu, 17 Nov 2022 22:34:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240801AbiKRG00 (ORCPT + 91 others); Fri, 18 Nov 2022 01:26:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbiKRG0Y (ORCPT ); Fri, 18 Nov 2022 01:26:24 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA40592B58; Thu, 17 Nov 2022 22:26:22 -0800 (PST) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4ND6H06JRszHvtg; Fri, 18 Nov 2022 14:25:48 +0800 (CST) Received: from dggpemm500015.china.huawei.com (7.185.36.181) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 14:26:21 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500015.china.huawei.com (7.185.36.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 14:26:20 +0800 From: Wang ShaoBo CC: , , , , , Subject: [PATCH] net: wwan: iosm: use ACPI_FREE() but not kfree() in ipc_pcie_read_bios_cfg() Date: Fri, 18 Nov 2022 14:24:47 +0800 Message-ID: <20221118062447.2324881-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500015.china.huawei.com (7.185.36.181) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org acpi_evaluate_dsm() should be coupled with ACPI_FREE() to free the ACPI memory, because we need to track the allocation of acpi_object when ACPI_DBG_TRACK_ALLOCATIONS enabled, so use ACPI_FREE() instead of kfree(). Fixes: d38a648d2d6c ("net: wwan: iosm: fix memory leak in ipc_pcie_read_bios_cfg") Signed-off-by: Wang ShaoBo --- drivers/net/wwan/iosm/iosm_ipc_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c index d3d34d1c4704..5bf5a93937c9 100644 --- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c +++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c @@ -249,7 +249,7 @@ static enum ipc_pcie_sleep_state ipc_pcie_read_bios_cfg(struct device *dev) if (object->integer.value == 3) sleep_state = IPC_PCIE_D3L2; - kfree(object); + ACPI_FREE(object); default_ret: return sleep_state; -- 2.25.1