From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6979DC433FE for ; Mon, 31 Jan 2022 14:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236914AbiAaOpQ (ORCPT ); Mon, 31 Jan 2022 09:45:16 -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.