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=-5.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 05DA7C433DF for ; Fri, 22 May 2020 11:45:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AB61620723 for ; Fri, 22 May 2020 11:45:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chrisdown.name header.i=@chrisdown.name header.b="ibYojR7I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB61620723 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chrisdown.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A18680008; Fri, 22 May 2020 07:45:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4522380007; Fri, 22 May 2020 07:45:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3687480008; Fri, 22 May 2020 07:45:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0241.hostedemail.com [216.40.44.241]) by kanga.kvack.org (Postfix) with ESMTP id 1F7D780007 for ; Fri, 22 May 2020 07:45:47 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CBEEE181AEF1E for ; Fri, 22 May 2020 11:45:46 +0000 (UTC) X-FDA: 76844175492.08.crib23_89b7a06105959 X-HE-Tag: crib23_89b7a06105959 X-Filterd-Recvd-Size: 3977 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 22 May 2020 11:45:46 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id u12so4727089wmd.3 for ; Fri, 22 May 2020 04:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ISPO3IWCguXmyabv5FXXISc8kopDXlzx6J+miu4ZHGA=; b=ibYojR7IUChRwwkGUFV8Ix7J3R87H9BNieXyiLNiM/Jz7JprAb6YKZQHsaIEWubbA+ 8KftKi894Ums2p9lR0f4LDfzaWCiUTYYYE2BV0WeoplnmONhzmzzbuk+WCmS86LPo7F0 PnqBigiKz8mhyR1JCC5EWyOY4Av7pNmTwJS+Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ISPO3IWCguXmyabv5FXXISc8kopDXlzx6J+miu4ZHGA=; b=DHAGUaYpfd9d1dNvt9hGHbQasnqK0r+8hiramQ+l5eL5KdTuE3LXQWdMsp+ba5WTH2 mTO/fi8PP3Sv/pcFYn08oQg3yU3aGbVDtxfF8O6pGDfZoPfRIdvveu5NCpSVKR1sJT7G IMmZSmKIymV98J4OtO2coxU+XW3pwcg4V0HUbN1bfMx++9gYWIXC39vJaLa64KpPCFSC 1MvSKwvbj3NCMmwN+CJtJT1xnUOgsJHfgJ46654LmjXFL9FfHPIEvoUu1dFJEsgPwlXb COt/BN6QyeY4pTP4elvQDHsjJBNDc1tjX5eo3rryRnODd+Qjf4DpXF3v0tgxjxEYx5jG AfDA== X-Gm-Message-State: AOAM533IEAAlY7WpwobBsNcLR2BG3i3Rt8w9nLXIPWtzZpIYJjjk2WLx sxUrJWW3J5ISH0mQFi6rX6nxFQ== X-Google-Smtp-Source: ABdhPJxN193yDA7z96NAkCU9aNyUbdslzeeF1KEAL/9qfdMH8sTFVLKpQgswqb3g0DKQMc9H59EaNg== X-Received: by 2002:a7b:c8d2:: with SMTP id f18mr12755108wml.174.1590147944952; Fri, 22 May 2020 04:45:44 -0700 (PDT) Received: from localhost ([2a01:4b00:8432:8a00:56e1:adff:fe3f:49ed]) by smtp.gmail.com with ESMTPSA id 94sm9696290wrf.74.2020.05.22.04.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 04:45:44 -0700 (PDT) Date: Fri, 22 May 2020 12:45:44 +0100 From: Chris Down To: Naresh Kamboju Cc: Yafang Shao , Michal Hocko , Andrew Morton , Johannes Weiner , Roman Gushchin , linux-mm , Cgroups , open list , lkft-triage@lists.linaro.org Subject: Re: [PATCH v3 2/2] mm, memcg: Decouple e{low,min} state mutations from protection checks Message-ID: <20200522114544.GA1112005@chrisdown.name> References: <20200505084127.12923-1-laoar.shao@gmail.com> <20200505084127.12923-3-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.14.1 (2020-05-03) 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: Naresh Kamboju writes: >This patch is causing oom-killer while running mkfs -t ext4 on i386 kernel >running on x86_64 machine version linux-next 5.7.0-rc6-next-20200521. I think I see what's wrong here -- if we bail out early, memory.e{min,low} might be uninitialised. Does this patch fix it, by any chance? diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d3b23c57bed4..aa902b9cbb79 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5046,6 +5046,9 @@ mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css) memory_cgrp_subsys.broken_hierarchy = true; } + memcg->memory.emin = 0; + memcg->memory.elow = 0; + /* The following stuff does not apply to the root */ if (!parent) { #ifdef CONFIG_MEMCG_KMEM -- 2.26.2