From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D536BC4332F for ; Thu, 17 Nov 2022 09:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233542AbiKQJQi (ORCPT ); Thu, 17 Nov 2022 04:16:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbiKQJQh (ORCPT ); Thu, 17 Nov 2022 04:16:37 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0CA35DB8B for ; Thu, 17 Nov 2022 01:16:35 -0800 (PST) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NCZ650hjfzRpLP; Thu, 17 Nov 2022 17:16:13 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 17 Nov 2022 17:16:34 +0800 Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 17 Nov 2022 17:16:33 +0800 Subject: Re: [PATCH 1/3] tpm: acpi: Call acpi_put_table() to fix memory leak To: Jarkko Sakkinen CC: , Peter Huewe References: <1667966622-19711-1-git-send-email-guohanjun@huawei.com> <1667966622-19711-2-git-send-email-guohanjun@huawei.com> From: Hanjun Guo Message-ID: Date: Thu, 17 Nov 2022 17:16:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.247] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On 2022/11/16 7:51, Jarkko Sakkinen wrote: > On Wed, Nov 09, 2022 at 12:03:40PM +0800, Hanjun Guo wrote: >> The start and length of the event log area are obtained from >> TPM2 or TCPA table, so we call acpi_get_table() to get the >> ACPI information, but the acpi_get_table() should be coupled with >> acpi_put_table() to release the ACPI memory, add the acpi_put_table() >> properly to fix the memory leak. >> >> While we are at it, remove the redundant empty line at the >> end of the tpm_read_log_acpi(). >> > > Please add to the commit message: > > Cc: stable@vger.kernel.org > > And cc this patch also to linux-kernel@vger.kernel.org. OK, will update this patch set as you suggested. Thanks Hanjun