Received: by 10.213.65.68 with SMTP id h4csp3350805imn; Mon, 9 Apr 2018 19:45:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx490f2K9pQk3Qu0c8BIv0of9gqcZGv6ulP4tKzSA51t9fVbi9UmByhfbmfcWOgMMjASyg+Nn X-Received: by 10.101.96.10 with SMTP id m10mr5722882pgu.281.1523328358237; Mon, 09 Apr 2018 19:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523328358; cv=none; d=google.com; s=arc-20160816; b=x+Epd5yrz4yK5Zil6gPS+9oz2zYoFd6mM6oBTU9gcrji2wEvfEG/dhjuPMXC5Bo47H +T6o/2qEwiteRhyHrb3Zo8vqlSOCmXxgn79++fmKmAvwcnrBeS50d/5NUI3otCn0tWzF wPOuCMNEAZi10yRNwcwiL95RI/7PpH1em5EdZwR7OJ8LZthLbZEDNOunklgNhrtqs4Bf QFavOlsYtJNWPtQMWurRCdAqI1XjBDlEodi43IapUcG5Rlf+E5BcUWe0c8pSFQw865Xd lYIvtE4g9XRyQnDR/Qh5DkTI4PUIMy16Jo8RQAVjbU0lAlr+Z40dNDDKjONYiWWiYOJt mteQ== 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:arc-authentication-results; bh=vfo7fMjrxj407ktU76aFaLygQhFZ4paaoN4LQ0ebnyU=; b=oXbWBKolfr13gQUpPFMe8j7gcv9c7CbJaMLhLzEOPEE//sjQOp4bsYerZYOOk3M2K4 Eb8FlaWdxk7EXMT15sCca7hmUsMbkgUxrCfSIAXw6uukcg4u8SdHZQHUWbM1SBakN0sv aEZUx7JKtkSAqECn62U9hAeA/ukV+4rCh5L5Pwq2rmBOwRc66zPIU4BGjbmvvDwxr0f1 GBy3TSJtSuxpaSvhPevtAgDaAVjORr25cB9FTTq8Ekkuy5p7VvlN+PK3NSwj0nGaTJAT XIQzP1XJF2eV8qLJXSrOeNafp7L/NuK69MUkye4MVvFu1viBAhdXkT+70BCUPMDbk1lG hBqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JykGk6el; 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 n34-v6si1573118pld.603.2018.04.09.19.45.21; Mon, 09 Apr 2018 19:45:58 -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=JykGk6el; 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 S1752181AbeDJCmC (ORCPT + 99 others); Mon, 9 Apr 2018 22:42:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45908 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbeDJCl7 (ORCPT ); Mon, 9 Apr 2018 22:41:59 -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=vfo7fMjrxj407ktU76aFaLygQhFZ4paaoN4LQ0ebnyU=; b=JykGk6eleYwaNkZwiDYPMHvtz 1FtLhWzE8E6XM/7zAjFMeF19IzN//H7vasrRKyQNbumT4QYVsFdvdurnrx7A+gE1Tty9qRfoq5b11 STurtCWkfijT3gHP0WFIRysfRkPZS2Zt7JOdvJewakBzt2Te47ygwfryXpqKZjFdPLBDLDOM5RAyY AG6jNpqRoS7blzKCcNJe0+hR+V1CLSE2XsG8cqKiNXFBFTp1NgxF2or0RpWxQlECgqJXaxCp8diyX wsFteBEXSBKQoz67xGBz4//YfAvxsOpmyDL8717u9Ffum8tAJ74mp65jrmpPOs/z+wb7HesVW65de dtwS6oZXA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5jEG-0000vi-S9; Tue, 10 Apr 2018 02:41:52 +0000 Date: Mon, 9 Apr 2018 19:41:52 -0700 From: Matthew Wilcox To: Minchan Kim Cc: Chao Yu , Jaegeuk Kim , Christopher Lameter , Andrew Morton , linux-mm , LKML , Johannes Weiner , Jan Kara , Chris Fries , linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] mm: workingset: fix NULL ptr dereference Message-ID: <20180410024152.GC31282@bombadil.infradead.org> References: <20180409024925.GA21889@bombadil.infradead.org> <20180409030930.GA214930@rodete-desktop-imager.corp.google.com> <20180409111403.GA31652@bombadil.infradead.org> <20180409112514.GA195937@rodete-laptop-imager.corp.google.com> <7706245c-2661-f28b-f7f9-8f11e1ae932b@huawei.com> <20180409144958.GA211679@rodete-laptop-imager.corp.google.com> <20180409152032.GB11756@bombadil.infradead.org> <20180409230409.GA214542@rodete-desktop-imager.corp.google.com> <20180410011211.GA31282@bombadil.infradead.org> <20180410023339.GB214542@rodete-desktop-imager.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180410023339.GB214542@rodete-desktop-imager.corp.google.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 10, 2018 at 11:33:39AM +0900, Minchan Kim wrote: > @@ -522,7 +532,7 @@ EXPORT_SYMBOL(radix_tree_preload); > */ > int radix_tree_maybe_preload(gfp_t gfp_mask) > { > - if (gfpflags_allow_blocking(gfp_mask)) > + if (gfpflags_allow_blocking(gfp_mask) && !(gfp_mask & __GFP_ZERO)) > return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE); > /* Preloading doesn't help anything with this gfp mask, skip it */ > preempt_disable(); No, you've completely misunderstood what's going on in this function.