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=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 4ADB9C433EF for ; Wed, 15 Sep 2021 00:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34C7261242 for ; Wed, 15 Sep 2021 00:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbhIOAyV (ORCPT ); Tue, 14 Sep 2021 20:54:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbhIOAyT (ORCPT ); Tue, 14 Sep 2021 20:54:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 58D726103B; Wed, 15 Sep 2021 00:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631667180; bh=+za6gOGgZTMu0MVI6wOLAb7tqLNqbH1pbLUF+1xhYYY=; h=From:To:Cc:Subject:Date:From; b=ZXxQI1qY9O21rUR13+AL/uJn5GG5mGZmg5xcInMK5TcdeHZZumljOixuitQeWqDUy GCVkJ7ZrWY4zW20g9X14/2c3D/A3/fMYBgl02VN8Ev6x1ISeSQjTvU+MTDSCNVTVzu aF4fK0P0ILpMsGXduS11pROdPdYOnhCcaM7gmV4QWbwZW2xO3DVD0Zp+l59AGUuUGP xt6NRqo7EPqiNOvG4+u9mOcAeVoOXzpUcB+qOsmwvFrOOirSUINWVeRSnlRrGov1Cg TYXexDRibevnp5XbaXkrheo35145t9vtiJVpBSweahy4NrVoxPi4F+AoD32P0pfcaw Mj51CvtWn2iNg== From: Masami Hiramatsu To: Steven Rostedt Cc: Linus Torvalds , Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Masami Hiramatsu , Linux-MM , Vlastimil Babka Subject: [PATCH v2 0/5] bootconfig: Fixes to bootconfig memory management Date: Wed, 15 Sep 2021 09:52:57 +0900 Message-Id: <163166717752.510331.12843735095061762373.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Here are the series of patches to fix bootconfig memory management issues. >From v1, I added some more fixes and split a memory leak fix from freeing unused memory patch. [1/5] fixing kernel BUG issue on boot. Just rebased on the linus tree. [2/5] Add new memblock leak fix in xbc_make_cmdline(). [3/5] Split from [4/5], fixing a memblock leak in setup_boot_config(). [4/5] Free unused memblock after boot. Use new memblock_free_ptr(). [5/5] Fix a tool build error caused by memblock_free_ptr(). And now I'm considering to move ownership of copied bootconfig data to lib/bootconfig. That will make code simpler. But I also think fixing bugs are urgent. So I send this series first. Thank you, --- Masami Hiramatsu (5): bootconfig: Fix to check the xbc_node is used before free it bootconfig: init: Fix memblock leak in xbc_make_cmdline() bootconfig: init: Fix memblock leak in setup_boot_config() bootconfig: Free copied bootconfig data after boot tools/bootconfig: Define memblock_free_ptr() to fix build error init/main.c | 9 +++++++++ lib/bootconfig.c | 3 ++- tools/bootconfig/include/linux/memblock.h | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) -- Masami Hiramatsu (Linaro)