linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing
Date: Tue, 5 Sep 2017 18:46:50 +0300	[thread overview]
Message-ID: <20170905154650.c3xiwp52btcckjr4@node.shutemov.name> (raw)
In-Reply-To: <1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com>

On Tue, Sep 05, 2017 at 05:30:39PM +0200, Laurent Dufour wrote:
> Seen while reading the code, in handle_mm_fault(), in the case
> arch_vma_access_permitted() is failing the call to mem_cgroup_oom_disable()
> is not made.
> 
> To fix that, move the call to mem_cgroup_oom_enable() after calling
> arch_vma_access_permitted() as it should not have entered the memcg OOM.
> 
> Fixes: bae473a423f6 ("mm: introduce fault_env")
> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>

Ouch. Sorry for this.

Acked-by: Kirill A. Shutemov <kirill@shutemov.name>

Cc: stable@ is needed too.

It's strange we haven't seen reports of warning from
mem_cgroup_oom_enable().

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-09-05 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 15:30 [PATCH] mm: Fix mem_cgroup_oom_disable() call missing Laurent Dufour
2017-09-05 15:46 ` Kirill A. Shutemov [this message]
2017-09-05 15:54   ` Laurent Dufour
2017-09-05 16:43 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170905154650.c3xiwp52btcckjr4@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).