Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp205007ybr; Fri, 22 May 2020 04:47:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0WkLRg8T8SWr1d/ZsFPAvFA/2fy5TLhmUc68t6wsjfSEdxTYTdgWq3RVM8nW0PlAr65zP X-Received: by 2002:a17:906:4dc3:: with SMTP id f3mr7520471ejw.323.1590148078061; Fri, 22 May 2020 04:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590148078; cv=none; d=google.com; s=arc-20160816; b=L4VIcB0m7EbdX6cJcXwj6r1KzB345LXNpsbCiksVWc761mafQfmRNFEV46SHBZLA+5 WxCheEKm5TuZIU8PAkNOzq87HEt9gKDwFFTSNAMB3F5BBAJ1Ex2sdalHfcmtSYTwE0uK NTFJaUQB0wcKluiRTjs0h7SDfJIBtrc5myZji/JxKFM+ejSpIeHpuin3ftTVu6eajEM7 1ueirFV4ZSf4NYFyA2gjZbCX4hJ+4taQR8Wb9hQlM8zspsFnuQTz80MAQ5IqP7aRW+RR AwcbRLWJFERkZP3XX3wA9OziXrAxSFafiNjTYl0XGtTdjNAwsjOI1dHmpB8dVYq5SaqK Wo5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ISPO3IWCguXmyabv5FXXISc8kopDXlzx6J+miu4ZHGA=; b=lNb1gn6F7Y3syr9jOOm7E8IV4lPYbfEYY/Yx3kwaDZygD799tBXmOv7YrT4P7OkEgt Wg1V35MDwx0thdbtJNj6CGC0NfXbo10LUfrTch0E8QsqDQQo2txMPPPEB+XiIYY3Cs+V RTNZqN+yekkRtBHEW0MaQcZKKC6NK+6eoRvS+9xknyyCcE6dEvqDbD4oZxfoAOpCVtBW MiQXczjfaVNhVRTmxOMUNNo0xqCJmqZxelkZcZB/Cd4aCmWd5MgMESINLXzZ2RDgPUFC FVSn2yEofxC11FiY3D5tneLnC5DqqWiIBRNGr/GePHPDbcxFgiJcTEJVqDgvrsmeAKqK xd3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=ibYojR7I; 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=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si4737006ejg.582.2020.05.22.04.47.35; Fri, 22 May 2020 04:47:58 -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=@chrisdown.name header.s=google header.b=ibYojR7I; 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=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729073AbgEVLpv (ORCPT + 99 others); Fri, 22 May 2020 07:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728356AbgEVLps (ORCPT ); Fri, 22 May 2020 07:45:48 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BF1DC05BD43 for ; Fri, 22 May 2020 04:45:46 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id n5so9533224wmd.0 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=sAsL+oQIJ7PewmyhLNSa+OStXRNRuQ0G+qkF9AOty21+x8WO/YFkQTwdDDl4gtaAEM uEjJlTOleRzMPLrC83U2CQ13HZugylTzkXdrKXKyAO/ndA3QKTUXepKvbqL2pZm2mXfl RPFcxEXjmBWLlz9eYMtO0sluOJVP6HExxkYF0ekws2S9Fm7RhKZaQilXxOWXbBATW1Jm 0mghtFJ8ZOvLJ+7nxrARnFz0plaQ40E+BvMPI1FBrF62Tvo0gLnjaHx+BST1dtlMbOE/ hdJOVSPmoa32vUjqypLgfOlmQkg9EsOApdNnC3R6g9RpB4ly4rtyhbk4RtDMnV1VtcxP CgKg== X-Gm-Message-State: AOAM533p6qj6HBDZ3HjtN16wkjYCK6xnnuUHaEBuh5unsz8VAVNQDXWs TN/qTYJRzi2gJk7e4z0pNPl/Pml8ubP8dKh8 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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