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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94142C433F5 for ; Thu, 31 Mar 2022 11:32:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E6C686B0072; Thu, 31 Mar 2022 07:32:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1B066B0073; Thu, 31 Mar 2022 07:32:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D08CD6B0074; Thu, 31 Mar 2022 07:32:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id C28C56B0072 for ; Thu, 31 Mar 2022 07:32:26 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 711F4A7594 for ; Thu, 31 Mar 2022 11:32:26 +0000 (UTC) X-FDA: 79304468292.19.BB0033B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf12.hostedemail.com (Postfix) with ESMTP id DFCEE40017 for ; Thu, 31 Mar 2022 11:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648726345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SAu/4xzDajMNjep6aDEEiUFGX6R0FRcoSt433wu4cDw=; b=bHkkY+2EEsJQt1mXnZeVJtEo+sRboiwfzOKZJIuzrBVJg/UTAZbT8Ri7zadv6mFVE/BUcc Uyl9V0xk8V7503KLUvrHSXzHh2GtQWvlhB1YO9Wm4jcQAWSRJZx5NPVQeH4CPYid818kNq AMhKmjJf71JeOlvCr7GtlfihWOJ8bKU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-331-tOc7I50TPx-Lde9yQz4wNg-1; Thu, 31 Mar 2022 07:32:21 -0400 X-MC-Unique: tOc7I50TPx-Lde9yQz4wNg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 80F54188B2BE; Thu, 31 Mar 2022 11:32:21 +0000 (UTC) Received: from localhost (ovpn-13-26.pek2.redhat.com [10.72.13.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C50C3C15D42; Thu, 31 Mar 2022 11:32:20 +0000 (UTC) Date: Thu, 31 Mar 2022 19:32:17 +0800 From: Baoquan He To: akpm@linux-foundation.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, dyoung@redhat.com, linux-mm@kvack.org Subject: Re: [PATCH v2 0/2] x86/kexec: fix memory leak of elf header buffer Message-ID: References: <20220223113225.63106-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220223113225.63106-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Stat-Signature: gjdu75mr7wk187f6gbywmdezn51wn391 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: DFCEE40017 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=bHkkY+2E; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf12.hostedemail.com: domain of bhe@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=bhe@redhat.com X-Rspam-User: X-HE-Tag: 1648726345-948961 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Andrew, On 02/23/22 at 07:32pm, Baoquan He wrote: > The memory leak is reported by kmemleak detector, has been existing > for very long time. It casue much memory loss on large machine > with huge memory hotplug which will trigger kdump kernel reloading > many times, with kexec_file_load interface. Could you merge these two patches? Or should I ping x86 maintainers to take them? Thanks Baoquan > > And in patch 2, clean up is done to remove unneeded > arch_kexec_kernel_image_load() and rename functions. > > V1 post can be found here: > https://lore.kernel.org/all/20211029072424.9109-1-bhe@redhat.com/T/#u > > v1->v2: > No code change. The v1 post has been acked by Dave Young but not > merged. In v2, just merging the old patch 1 and 2 as per Dave's concern > in v1 post. > > Baoquan He (2): > x86/kexec: fix memory leak of elf header buffer > kexec_file: clean up arch_kexec_kernel_image_load > > arch/x86/kernel/machine_kexec_64.c | 23 +++++++++-------------- > include/linux/kexec.h | 1 - > kernel/kexec_file.c | 9 ++------- > 3 files changed, 11 insertions(+), 22 deletions(-) > > -- > 2.31.1 >