Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2427109ybi; Sat, 13 Jul 2019 14:27:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeWTm4ovpcPwdA7hRelEcp/0BHvbz1+FDIRWlXOnUNdLsMoWdpEY/NPsk/UuRjWAFVjH7O X-Received: by 2002:a17:90a:fa18:: with SMTP id cm24mr19735487pjb.120.1563053229076; Sat, 13 Jul 2019 14:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563053229; cv=none; d=google.com; s=arc-20160816; b=BZMW5HDGwTMZCQ2Ui+ZI2ezIz+VF6B87hDDb4DvFUfOV6J+Vpq9NRASi8Iuroo5gTT JY+z5sdE/v3IWcj9K6O2liTutgj/gth/F8N2lNOxGcWQv2a2TmPw64O5qS5rWAbtzmUQ Mfro9A29CEqXMsohcpxEnJVKjXQebUQbfnsDtCzrKjBuRXaQKLtnjcoRQtDfZ//M1tqL QQoxyEP368r5E38V6l1OiwmnOC0hC3rC26aTKIQHBrf8/SVFH5bc+V4eN7LhOwvIJ9zu nrYov2CK+PN+V3UnAh32+hWxSxRpnF7rE653sFyC173VXqY6Wz4Psh2R9FMjrqqblWBC Ucvw== 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=gSeKyUjR9e/8E6Ail8I9eTrrv33i24P5Ay0IpiUeSuk=; b=SjJFgd02WXysWxsLgKq/zEp0Q/KW+/XnHGv053GLhShQoQKKL55LGUtpx0cqmZgEP2 L42WvgvGX5YdkbxMYZ0w3lZb82BR/9qg8a234G5wGycOuMG/JoYQQ1XQxJdgZYNGrqK7 fpj76qhjr0k+qV5dx9xcgtEhLxOdvIXSUYKRzg0QKexdOtOEYtlknEbhVffuCGcvurdf 5X1fhKdQF1dveOs6DiSRzEesph+gLsncM+6Cj93soP/oHXq8YUp1b022gKD8JWC/CKUm mL3Lj3JL9huSGfHFYMuteUDXiXLjlqU8Cbs+KLpxqIRCXTOgY/fstSU/OkPdbRHi1nDK nqCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=n+MOy4uU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go12si10982216plb.251.2019.07.13.14.26.47; Sat, 13 Jul 2019 14:27:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=n+MOy4uU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728123AbfGMVZz (ORCPT + 99 others); Sat, 13 Jul 2019 17:25:55 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37834 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbfGMVZz (ORCPT ); Sat, 13 Jul 2019 17:25:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gSeKyUjR9e/8E6Ail8I9eTrrv33i24P5Ay0IpiUeSuk=; b=n+MOy4uUpRDDKVw797VGean/L sLUlmgRNfdhMrcyVN318bqRxqpOqYGP1ql3GAbR51HRE1PO6hWDniUxEovN4bBCID4hZBrBc3/3tW 1UU8uqKuIEz+vEOchWEaAW/A8YXw7qM+rzkndP83kJeIfXlC5qCWy49VTdHbvS1yp1oKfRPrgWR/G CDT6ujKi+a9TkD46YJ6fBfxu4DY2Jsw9TZm6nZ8F3oiGPI0tDKH3KnynKzLyiMjBVkAiYuaSyPo+h 3acXGDjgf3JYRk4OygMyT6AzThsOMTGJ8ip1m/HH0WmJGNjCt/PYtYOAE4WSxQ2YV0L6/4F3b6lUc KgI9MVqCQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hmPWf-00081A-1g; Sat, 13 Jul 2019 21:25:49 +0000 Date: Sat, 13 Jul 2019 14:25:48 -0700 From: Matthew Wilcox To: Yang Shi Cc: mhocko@suse.com, dvyukov@google.com, catalin.marinas@arm.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: page_alloc: document kmemleak's non-blockable __GFP_NOFAIL case Message-ID: <20190713212548.GZ32320@bombadil.infradead.org> References: <1562964544-59519-1-git-send-email-yang.shi@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1562964544-59519-1-git-send-email-yang.shi@linux.alibaba.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 13, 2019 at 04:49:04AM +0800, Yang Shi wrote: > When running ltp's oom test with kmemleak enabled, the below warning was > triggerred since kernel detects __GFP_NOFAIL & ~__GFP_DIRECT_RECLAIM is > passed in: There are lots of places where kmemleak will call kmalloc with __GFP_NOFAIL and ~__GFP_DIRECT_RECLAIM (including the XArray code, which is how I know about it). It needs to be fixed to allow its internal allocations to fail and return failure of the original allocation as a consequence.