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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4893C433F5 for ; Wed, 15 Sep 2021 01:45:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C33A361212 for ; Wed, 15 Sep 2021 01:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbhIOBrM (ORCPT ); Tue, 14 Sep 2021 21:47:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:37866 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbhIOBrL (ORCPT ); Tue, 14 Sep 2021 21:47:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E47260F6C; Wed, 15 Sep 2021 01:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631670353; bh=xMCS2nurSB8LZcGtKXwO1JEEW4Gr1XYO8f1Eg2h7Llo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eq7ZBiU+azjY2HTf8eCwJpXY8Lt51e/wJxrpxUJM4mxNP1LMnWqbZew2Nicbd0OG7 5HV9KsfBbFaviO0slh0yuCd87SftqUNHruRkB3a8fAnwiZ1c+J9XjHHTrulZqNFfUP zCpsS1TRJuyGyovE+gFN+8bKwJbZfUl79Agq1XCBfJP1lQHKjvl1obQL0R6uRwkyJS KTwH3nnrB7RO1xVJVvJ31EvyMkTVLRQLJ1x6xG153ad6rFDJ/RvcEpPFzeguNwBR5f xdsThmNWN8SorWHcoV2XyCMquaytxvygaNmJttXtBGrIa9Zp506AASugD2I2NetwEw LhlQHH4raVqrQ== Date: Wed, 15 Sep 2021 10:45:50 +0900 From: Masami Hiramatsu To: Linus Torvalds Cc: Steven Rostedt , Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Linux-MM , Vlastimil Babka Subject: Re: [PATCH v2 4/5] bootconfig: Free copied bootconfig data after boot Message-Id: <20210915104550.99a35ef0f1b0e944febf3293@kernel.org> In-Reply-To: References: <163166717752.510331.12843735095061762373.stgit@devnote2> <163166721027.510331.6820619440348067061.stgit@devnote2> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Sep 2021 18:13:51 -0700 Linus Torvalds wrote: > On Tue, Sep 14, 2021 at 5:53 PM Masami Hiramatsu wrote: > > > > Free copied bootconfig data after booting kernel because that > > data will not be used anymore. > > Don't do this. > > You have already passed in that 'copy' to the xbc code, and > xbc_destroy_all() should just free it. > > Don't add new pointless variables to keep track of state that somebody > else already keeps track of. Ah, OK. So when I pass the copy, the ownership should be passed too. Thank you, > > Linus -- Masami Hiramatsu