Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2723874pxb; Sun, 31 Oct 2021 23:55:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx9lSLZ+cuM0W4Y6tJfTHrsA0q/xvtbO1tjgVoqwP34TRjhVbRYrcD+VVvfT83yp92bVNb X-Received: by 2002:a5e:c90f:: with SMTP id z15mr18459261iol.103.1635749753396; Sun, 31 Oct 2021 23:55:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635749753; cv=none; d=google.com; s=arc-20160816; b=nAZq1ZLFlW+yOSPakFsWkuxmQ0UtVNOGx8a7C4+YlsAXNdhh0duTzMbXeQhissBDER VLrMght3yw/RjR+nCg8nneg4J/o/tOCRS35czoVL568nq0tjB4l/CSuvPp6TN5rmtUgf jtU6w7zG6AbNN8PvSl7tNa51vwH6QlB6m3sr2Ez4ENlLq4TPtOnuVSeyjMJ7xNtfVSXI IM8AmeTBqOxa3K/hocj+vdlCvBPvtIRZ/t10CToCGiXCD7bhcauu1GYW2hTuWB8/DjOi Xj2eVZL10iubnv+YRqBhPSoUxv4loL8aOAEFROk6WXpl4y3rtC+eSGcpu/5vBCo4Wqau O5fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NhXyRApgs2cJlmSVsNQs3Vi5TjevtHCjRWBXl4hPKh0=; b=GkAvbXmo9bnTeL4Tk1UxNPpouZwBsJGg8ThPFdun0hQect1dmiodWzMhQs06f9RgDB 52tq4GR6PCVwv9wGp0Qr5adHxXistIR8lftsvjjaJz3VNN8FA7zTqKFXuy0mHT6QBNX9 aAFwa0IJe7/27/671U663ATaKnPmajwzCFibEayZuJioCp8el5pSrtO2soZe/ijiLERR zUnaeLa9axRIuxANYCYQwKX9h+YrvtLPtIxo16KKK4NWWTqqkyrW1LZjmddlu/RuHfBE p865pf4Iuvl/LBNsm+tcfJWxDwMNwgcVDgY5fRej9MpYRiIrprJE89LMSeZCtZtFgwO5 QmWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+Vx+IxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si22047843ili.170.2021.10.31.23.55.42; Sun, 31 Oct 2021 23:55:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g+Vx+IxD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbhKAG5Y (ORCPT + 99 others); Mon, 1 Nov 2021 02:57:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21551 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbhKAG5Y (ORCPT ); Mon, 1 Nov 2021 02:57:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635749690; 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=NhXyRApgs2cJlmSVsNQs3Vi5TjevtHCjRWBXl4hPKh0=; b=g+Vx+IxDmTtl0iIIikCmGsBhkJBuARFcehuepVXZDiLs1VlfiLlT3gpJuU7cTaDc14oEfz jifBp9GDBcDLrrVi0jZj24t883wiXA/z74Ekyh5ojV5Kl2yb+axSw7gGWcsGsG+m2pXcDv kEgwhmyUi5gV/TQrDtsU5553IrIHJDQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-534-25ZQ8Jg9ONedDt86TfWf1g-1; Mon, 01 Nov 2021 02:54:49 -0400 X-MC-Unique: 25ZQ8Jg9ONedDt86TfWf1g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2B2791006AA3; Mon, 1 Nov 2021 06:54:48 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-13-86.pek2.redhat.com [10.72.13.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0F6C260C0F; Mon, 1 Nov 2021 06:54:45 +0000 (UTC) Date: Mon, 1 Nov 2021 14:54:42 +0800 From: Dave Young To: Baoquan He Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, akpm@linux-foundation.org Subject: Re: [PATCH 0/3] x86/kexec: fix memory leak of elf header buffer Message-ID: References: <20211029072424.9109-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211029072424.9109-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Baoquan, On 10/29/21 at 03:24pm, Baoquan He wrote: > The memory leak is reported by kmemleak detector, has been existing > for very long time. It could casue much memory loss on large machine > with huge memory hotplug which will trigger kdump kernel reloading > many times, with kexec_file_load interface. > > And in patch 2, 3, clean up is done to remove unnecessary elf header > buffer freeing and unneeded arch_kexec_kernel_image_load(). > > Baoquan He (3): > x86/kexec: fix memory leak of elf header buffer > x86/kexec: remove incorrect elf header buffer freeing > 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.17.2 > Acked-by: Dave Young nitpick: the first two patches can be merged togeter, but I'm also fine if they are in two patches. Thanks Dave