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 F16DBC4332F for ; Sun, 18 Dec 2022 00:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbiLRAcd (ORCPT ); Sat, 17 Dec 2022 19:32:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiLRAcb (ORCPT ); Sat, 17 Dec 2022 19:32:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86B2AE004; Sat, 17 Dec 2022 16:32:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 228D360C6C; Sun, 18 Dec 2022 00:32:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA59CC433D2; Sun, 18 Dec 2022 00:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1671323549; bh=9avVX4rWz+0DFaSot1tqCO7Hml3sUh4OLO3CAj/xkIs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=X2imIY7DDEIdZC0adiZPHv6q3BfQboikn8a6nfwMJkpn8pPjOjfwVuDwm53UtmzEB hDeGIH7dn4tKZPkDWLkMWwUJXsvfdzZRnVO7JUBS37WzEfH2RLjymeBHHU2xNK/P5n taZqDw2atwi2lPJ5B7vr1XabtAH1BkboTKSLn60M= Date: Sat, 17 Dec 2022 16:32:28 -0800 From: Andrew Morton To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jianglei Nie , Baoquan He , Benjamin Herrenschmidt , Chen Lifu , "Eric W . Biederman" , Li Chen , Michael Ellerman , Paul Mackerras , Petr Mladek , Russell King , ye xingchen , Zeal Robot , kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH AUTOSEL 6.1 13/22] proc/vmcore: fix potential memory leak in vmcore_init() Message-Id: <20221217163228.9308c293458ceb680a6ffed8@linux-foundation.org> In-Reply-To: <20221217152727.98061-13-sashal@kernel.org> References: <20221217152727.98061-1-sashal@kernel.org> <20221217152727.98061-13-sashal@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sat, 17 Dec 2022 10:27:14 -0500 Sasha Levin wrote: > From: Jianglei Nie > > [ Upstream commit 12b9d301ff73122aebd78548fa4c04ca69ed78fe ] > > Patch series "Some minor cleanup patches resent". > > The first three patches trivial clean up patches. > > And for the patch "kexec: replace crash_mem_range with range", I got a > ibm-p9wr ppc64le system to test, it works well. > > This patch (of 4): > > elfcorehdr_alloc() allocates a memory chunk for elfcorehdr_addr with > kzalloc(). If is_vmcore_usable() returns false, elfcorehdr_addr is a > predefined value. If parse_crash_elf_headers() gets some error and > returns a negetive value, the elfcorehdr_addr should be released with > elfcorehdr_free(). This is exceedingly minor - a single memory leak per boot, under very rare circumstances. With every patch I merge I consider -stable. Often I'll discuss the desirability of a backport with the author and with reviewers. Every single patch. And then some damn script comes along and overrides that quite careful decision. argh. Can we please do something like if (akpm && !cc:stable) dont_backport() And even go further - if your script thinks it might be something we should backport and if it didn't have cc:stable then contact the author, reviewers and committers and ask them to reconsider before we go and backport it. This approach will have the advantage of training people to consider the backport more consistently. I'd (still) like to have a new patch tag like Not-For-Stable: or cc:not-stable or something to tell your scripts "yes, we thought about it and we decided no".