Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726825

Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing

From Laurent Dufour <ldufour@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing
Date 2017-09-05 18:00 +0200
Message-ID <umoqB-4Dm-1@gated-at.bofh.it> (permalink)
References <umo7f-4v5-7@gated-at.bofh.it> <umogV-4zk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/09/2017 17:46, Kirill A. Shutemov wrote:
> 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.

Andrew, should I resent it with stable in copy ?

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

AFAIU, arch_vma_access_permitted() is only defined for x86 and it is
failing only in the case of the protection key mismatch, not so much used
for now...

Cheers,
Laurent.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm: Fix mem_cgroup_oom_disable() call missing Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-09-05 17:40 +0200
  Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-09-05 17:50 +0200
    Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-09-05 18:00 +0200
  Re: [PATCH] mm: Fix mem_cgroup_oom_disable() call missing Michal Hocko <mhocko@kernel.org> - 2017-09-05 18:50 +0200

csiph-web