Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbdIEPq4 (ORCPT ); Tue, 5 Sep 2017 11:46:56 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38405 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbdIEPqx (ORCPT ); Tue, 5 Sep 2017 11:46:53 -0400 X-Google-Smtp-Source: ADKCNb7Gp5EJBQPzjmxxblVg//+w8aALBRsCzimlepisbDIyLmM3vpW8s7D8g5vm4BcMs5XPxJiFjw== Date: Tue, 5 Sep 2017 18:46:50 +0300 From: "Kirill A. Shutemov" To: Laurent Dufour 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 Message-ID: <20170905154650.c3xiwp52btcckjr4@node.shutemov.name> References: <1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504625439-31313-1-git-send-email-ldufour@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 692 Lines: 22 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 Ouch. Sorry for this. Acked-by: Kirill A. Shutemov Cc: stable@ is needed too. It's strange we haven't seen reports of warning from mem_cgroup_oom_enable(). -- Kirill A. Shutemov