Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2352431ybl; Sat, 24 Aug 2019 15:39:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJIxJh95Qh1z1Zfq3cEp85sXC+RTictNG5piR7aEX2p+NGJK38s+MT+CMZGgbuTemmwz8f X-Received: by 2002:a17:90a:3847:: with SMTP id l7mr11675888pjf.99.1566686376709; Sat, 24 Aug 2019 15:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566686376; cv=none; d=google.com; s=arc-20160816; b=WEzersqzamxZk//8q4DKO6BxCbtIA0PO+sslVLgyza4SrLyWcabIouLSxyfGoGWBBW hHv0+zp2wTC2TOP/JWXp1NoMKYL0RiZ4fmh7BCDWwe/Ng+WpOimgNRyHrBoyNyEcg4A0 pz4fBbtNVLv/9Ye0ePrChTxkAlLUtxrIz9xa5C+/2qQX7VXM83tnCsT+l8pTAwFWcTJe yvRMtJQKjw7iuw648w70Q/bYWiCpefn4cq8yl25vdAwJqLhAqCe9PsrUUlTI87mm5oUH 7p4pSyBR/alflMskbWO8mIw+RJ5MFQqDwD1hbzcSBVIbgY9kO1cd4vPkRf9LWnMR5Xlk RbnA== 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; bh=Fvptbl+rZ+5Hfxj99xy3gvye0YN8bV8IMSY93/zXHRs=; b=ydziObPmF5olcqr1Qt4fDetuw89oVIb6V4bIqXvL3YZpfPNLxRyFUR5dZqiekmIEli XRKitMUwfjfY0rI4P+Vb7EeQzsuCUQQppUl1/HsTcRYdVuJRDWk7v7uyTFLQSCGrh9lf CeivicIXHH4bx/UeUBB/f2nN7e2lhIdlCd8AZRY26/LgxBIK5lgEdxhn9IENeOSSzrIJ si9g68UUKZ/Wyj+fWjS08ZhiB3PKVLGA2jM5Eolsd1miWLOWtbMoQ1w5K2z/kBhhiyAg nMMrAVTNchDm5Hr6E1jyneFrtMPqDRreR/LeVk7hBfvZaJE7epC3LOlOrAlQl94otBlH yAdQ== ARC-Authentication-Results: i=1; mx.google.com; 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 u9si5270458pgf.198.2019.08.24.15.39.21; Sat, 24 Aug 2019 15:39:36 -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; 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 S1728211AbfHXWh6 (ORCPT + 99 others); Sat, 24 Aug 2019 18:37:58 -0400 Received: from verein.lst.de ([213.95.11.211]:37660 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbfHXWh6 (ORCPT ); Sat, 24 Aug 2019 18:37:58 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5FED368B02; Sun, 25 Aug 2019 00:37:54 +0200 (CEST) Date: Sun, 25 Aug 2019 00:37:54 +0200 From: Christoph Hellwig To: Ralph Campbell Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Jason Gunthorpe , Andrew Morton , Christoph Hellwig Subject: Re: [PATCH 1/2] mm/hmm: hmm_range_fault() NULL pointer bug Message-ID: <20190824223754.GA21891@lst.de> References: <20190823221753.2514-1-rcampbell@nvidia.com> <20190823221753.2514-2-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190823221753.2514-2-rcampbell@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 23, 2019 at 03:17:52PM -0700, Ralph Campbell wrote: > Although hmm_range_fault() calls find_vma() to make sure that a vma exists > before calling walk_page_range(), hmm_vma_walk_hole() can still be called > with walk->vma == NULL if the start and end address are not contained > within the vma range. Should we convert to walk_vma_range instead? Or keep walk_page_range but drop searching the vma ourselves? Except for that the patch looks good to me: Reviewed-by: Christoph Hellwig