From patchwork Fri Nov 18 06:24:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wangshaobo (bobo)" X-Patchwork-Id: 22115 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp27846wrr; Thu, 17 Nov 2022 22:34:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7mFRsVxwdFMT+39A3sWwqusa4vMd1c5kC3hau6xPzUEGWMjmDyG+SLaawkfPURGFeddAgZ X-Received: by 2002:a17:90b:4f85:b0:216:92a9:fd60 with SMTP id qe5-20020a17090b4f8500b0021692a9fd60mr12084386pjb.24.1668753261060; Thu, 17 Nov 2022 22:34:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668753261; cv=none; d=google.com; s=arc-20160816; b=AMEvM2v9nZMRuvzyO+B8Ei4MynaWFA6Tg25C9OE+zEqYa/yNnOBa3J3sbWTfIyoHC/ iG1VGhMcH6H+3pNOW4jzad8NlB6hgrIFoStymWtSkAtyYA1l6IQhiK4MS9iYp6GEdj54 QsRdWS9miTT6muCApD7PXkA39HnKqko2kry/dYOdV1NgTAkOdtM/sTyNZf9/sBemHUUC 5+ljH1UDUgl/1qVYQhRhkNTyt+Myd6ZKvUW/TyyJbldBLKrWeyt7pEGMHZtcEBxC4JiP vAE0rErmvvAz8U3j8kOTDbxQOH0DtTSpSImNcHjELe73Xbya8/Iit6OBkw3CP1pWbbEE 3yHQ== 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 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.07; Thu, 17 Nov 2022 22:34:21 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749814619415293101?= X-GMAIL-MSGID: =?utf-8?q?1749814619415293101?= 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;