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 9353FC433FE for ; Fri, 25 Mar 2022 01:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357352AbiCYBcI (ORCPT ); Thu, 24 Mar 2022 21:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357327AbiCYBbw (ORCPT ); Thu, 24 Mar 2022 21:31:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF7A3A18D for ; Thu, 24 Mar 2022 18:30:20 -0700 (PDT) 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 3196E61941 for ; Fri, 25 Mar 2022 01:30:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89E3BC340EC; Fri, 25 Mar 2022 01:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648171819; bh=sC7g21iTmzokOZPB4kioAwZ53wvyRSOvhPfJjqULaaU=; h=Date:To:From:Subject:From; b=xtpjGZgICXpMAkSfv454POYLSjS7jotQhIPfnJ98worKflHbF1KO8JyqN2/zL07Lu C3UXoTIIjbkcuQq/HqbLqU7tUpi8QGoFKxF41nelC1L733OSdq7BfF7Ebb50NKNEax 3ffXOWCvtB2dohB+OnuT/rYJ377WStPK+TBZX4e0= Date: Thu, 24 Mar 2022 18:30:18 -0700 To: mm-commits@vger.kernel.org, vdavydov.dev@gmail.com, roman.gushchin@linux.dev, mkoutny@suse.com, mhocko@kernel.org, i.zhbanov@omprussia.ru, hannes@cmpxchg.org, rdunlap@infradead.org, akpm@linux-foundation.org From: Andrew Morton Subject: [merged] mm-memcontrol-return-1-from-cgroupmemory-__setup-handler.patch removed from -mm tree Message-Id: <20220325013019.89E3BC340EC@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: mm/memcontrol: return 1 from cgroup.memory __setup() handler has been removed from the -mm tree. Its filename was mm-memcontrol-return-1-from-cgroupmemory-__setup-handler.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Randy Dunlap Subject: mm/memcontrol: return 1 from cgroup.memory __setup() handler __setup() handlers should return 1 if the command line option is handled and 0 if not (or maybe never return 0; it just pollutes init's environment). The only reason that this particular __setup handler does not pollute init's environment is that the setup string contains a '.', as in "cgroup.memory". This causes init/main.c::unknown_boottoption() to consider it to be an "Unused module parameter" and ignore it. (This is for parsing of loadable module parameters any time after kernel init.) Otherwise the string "cgroup.memory=whatever" would be added to init's environment strings. Instead of relying on this '.' quirk, just return 1 to indicate that the boot option has been handled. Note that there is no warning message if someone enters: cgroup.memory=anything_invalid Link: https://lkml.kernel.org/r/20220222005811.10672-1-rdunlap@infradead.org Fixes: f7e1cb6ec51b0 ("mm: memcontrol: account socket memory in unified hierarchy memory controller") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Reviewed-by: Michal Koutný Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Roman Gushchin Signed-off-by: Andrew Morton --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/memcontrol.c~mm-memcontrol-return-1-from-cgroupmemory-__setup-handler +++ a/mm/memcontrol.c @@ -7058,7 +7058,7 @@ static int __init cgroup_memory(char *s) if (!strcmp(token, "nokmem")) cgroup_memory_nokmem = true; } - return 0; + return 1; } __setup("cgroup.memory=", cgroup_memory); _ Patches currently in -mm which might be from rdunlap@infradead.org are