Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1192551ybk; Thu, 21 May 2020 00:37:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqJ2WcMehl11mI7W2IKS5Pb/rMdIvhLZSONnJ9XyF+NSYkg4RujpcaHmktlIm9vTB8HGaz X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr2483703eje.47.1590046646726; Thu, 21 May 2020 00:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590046646; cv=none; d=google.com; s=arc-20160816; b=DZ2c6Q8bY0mCnSYFQGtNdqjVRS91gShQSX+8gAb2x/Hjy2l0cPJWHhCKKcEciJTh4N QCTa9YYlusS+b9ZDtdNGIJsTiL1RJ8RAQi53AvZs9gJtzRVdX3a5pLJ0dsgZBzs+8pDP DvQikaEjCox8AfKljiydhSELcWPWrmQjy7BHOI0K/8hi8RAFKK0gTO1M/FDFvwBRd2R7 fSdlw94985OYecdc4jXgQ48qOSznXbD3ltymCtF4DrzP+2DOJxmgacIjK38INVm3rZvj 6IKhzg8DV0kdpWPkynNF4TCE51QFqY7u0EvaGmuNkfpXRVReFDocReA1bBGAyQYGLXfq gh2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=eQ96IiTxR2VpWASW+mhAtzAn0MedzS/h1Ye3PoIa+ug=; b=OCbZutVUbs+PiSf39aWzSd+DVq8bzXmsDrtB8dOWSvyLtjngjF6Z/qECK0uMHoyibg ovAC0D6oc6do2cXfs5OQNPoHZF06kJngWamgQL3G3Ll7FMvah4oc9qsM6kjXooiYBXGA lQX5s9peQ19Q2mE818YS568U99zXHxlbDoc/OP9gMsTAB1OsmnTFonY7nr72+4aBMo6v duO3jTB07aS9S6IGa5zYLbRwv4OA6mJbI6r/An1nTPCfXqGc+PUo2+6uGpq1lQz40Nb+ caM/AH+796hn/vPTDNWT2xBV95eJiYLXOfAsvWPp4iWxx5qFFvL+F8sLILlWdFXYlYxo SezQ== ARC-Authentication-Results: i=1; mx.google.com; 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 q23si2543890eds.325.2020.05.21.00.37.03; Thu, 21 May 2020 00:37:26 -0700 (PDT) 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; 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 S1728358AbgEUHfk (ORCPT + 99 others); Thu, 21 May 2020 03:35:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:60224 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728245AbgEUHfk (ORCPT ); Thu, 21 May 2020 03:35:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E0F3FACE3; Thu, 21 May 2020 07:35:39 +0000 (UTC) Subject: Re: [PATCH v6 09/12] mmap locking API: add mmap_assert_locked() and mmap_assert_write_locked() To: Michel Lespinasse , Andrew Morton , linux-mm Cc: LKML , Peter Zijlstra , Laurent Dufour , Matthew Wilcox , Liam Howlett , Jerome Glisse , Davidlohr Bueso , David Rientjes , Hugh Dickins , Ying Han , Jason Gunthorpe , Daniel Jordan , John Hubbard References: <20200520052908.204642-1-walken@google.com> <20200520052908.204642-10-walken@google.com> From: Vlastimil Babka Message-ID: Date: Thu, 21 May 2020 09:35:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200520052908.204642-10-walken@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/20/20 7:29 AM, Michel Lespinasse wrote: > Add new APIs to assert that mmap_sem is held. > > Using this instead of rwsem_is_locked and lockdep_assert_held[_write] > makes the assertions more tolerant of future changes to the lock type. > > Signed-off-by: Michel Lespinasse Reviewed-by: Vlastimil Babka