Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp897219pxb; Tue, 1 Feb 2022 12:42:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxYCS6DyzvIcMTxGlBxb8aRGrE5dWvdyjX08ukiDPGTYZcy6+/niFAbDX/YVwoz7+bySkz X-Received: by 2002:a17:902:d48a:: with SMTP id c10mr27377144plg.139.1643748122334; Tue, 01 Feb 2022 12:42:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748122; cv=none; d=google.com; s=arc-20160816; b=soR/jdcIdugRo5+5UEIqm8oLNAmH3sydKkMNFKIqGPbV1dZhlnz8h98zUtj0yNVe3O Ex1lZzYJtgFXT0YIVW39xff5rV1Qs9odObD+YLFeldi4gY5jjoL7ntibVgZ15FkMYPtt M8cnDSk8GnWhHnwKUiw940G8kx4wBXcyYHGb+Q8OQGxXola3Okhe0XhAmN7qu03bZphu Kk2ZDzFWbL4gVLJvSLiQryLVIyzIpCU6IIcbhz2Xj1spZxLMNEEG4bPgVpUB1GfA8+5d zCTxjUB9FgZ3mLPeNAM6HgQEoeTEtfE6IrmFSRlVzb8BLXlfMAH9LqZ2SVT/676mbaMl fzow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S37hV5LKYMZr1FwdKbRBbnns+EHid9XjyHNmHg+zn0s=; b=Q9W1K8D+/G4iBGnHZoAStHD7uY1sJD6vqWG9KL4H7500vU3KKWI8A6wIWPedzFOWSz 1iaOkD/R1ZjM5h6sdR32lzVeVt8fCdU9PrX+7DnJYA8wpPW/IswOs/zNBfbNYU2eDeLX 9AkQXFK3NHgCF9c7hxrJ+a8AN6rqa1lLDJU8XzQRm2Bfxbb5o3UzFGWpAI6daLZlzrXs cim2VfVPyZDF2wuvIVLA+YvI1YWrCVweUlbi/q58EetuItuVApgEOHucy79+pdDAQVFn 16NRp+59CLmlDfAjVc8KaaIHXqnCiBjW5Dhgq2SKErImzeeUli2w1gPOpSWffJYpMF5Q DeOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T67AodPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 34si6048392pgq.376.2022.02.01.12.41.51; Tue, 01 Feb 2022 12:42:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=T67AodPb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241739AbiAaOpP (ORCPT + 99 others); Mon, 31 Jan 2022 09:45:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242023AbiAaOpH (ORCPT ); Mon, 31 Jan 2022 09:45:07 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A669AC06173B for ; Mon, 31 Jan 2022 06:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=S37hV5LKYMZr1FwdKbRBbnns+EHid9XjyHNmHg+zn0s=; b=T67AodPbh6KjEXf58AyRu2Mb9k Ja+cbgWubfMKArkw4GvrZ9bhtm5QFzrcusJg2M5hdW7/TnNDHDIFDLnXqo/zlv0o7+vNa0MEXbKbV gn0Kbzbm3yfdMO4sXhjpVlYY2kNCCE0FBRaaTRQThzFifyvARd8MrOTtiG0e7wGpBRB9VG1F/kccB 0pmOEDERa1yMdETLCBl4+fBNvBd7wk/RLUXDpj46b4ppYCyVgv72Q2Vq38p6BURmRfm9/VGKQeXhQ /LVSXR00CgQL++0RFinoAjEtt/cPws6pjPE0lDzE5BiqQsMTfmCNc32hjC4E/1QWLsgQ9Cnl2teoP zNZWi0cw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEXvL-009z9U-6c; Mon, 31 Jan 2022 14:44:55 +0000 Date: Mon, 31 Jan 2022 14:44:55 +0000 From: Matthew Wilcox To: Michel Lespinasse Cc: Linux-MM , linux-kernel@vger.kernel.org, Andrew Morton , kernel-team@fb.com, Laurent Dufour , Jerome Glisse , Peter Zijlstra , Michal Hocko , Vlastimil Babka , Davidlohr Bueso , Liam Howlett , Rik van Riel , Paul McKenney , Song Liu , Suren Baghdasaryan , Minchan Kim , Joel Fernandes , David Rientjes , Axel Rasmussen , Andy Lutomirski Subject: Re: [PATCH v2 12/35] mm: separate mmap locked assertion from find_vma Message-ID: References: <20220128131006.67712-1-michel@lespinasse.org> <20220128131006.67712-13-michel@lespinasse.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220128131006.67712-13-michel@lespinasse.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 05:09:43AM -0800, Michel Lespinasse wrote: > This adds a new __find_vma() function, which implements find_vma minus > the mmap_assert_locked() assertion. > > find_vma() is then implemented as an inline wrapper around __find_vma(). You might like to take inspiration from the maple tree patches where we assert that either the RCU lock is held or the mmap_lock is held.