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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C3AAC433E0 for ; Thu, 21 May 2020 17:25:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 520B220829 for ; Thu, 21 May 2020 17:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mma1o5Ws" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 520B220829 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D429B80008; Thu, 21 May 2020 13:25:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CF29680007; Thu, 21 May 2020 13:25:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0A5C80008; Thu, 21 May 2020 13:25:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0176.hostedemail.com [216.40.44.176]) by kanga.kvack.org (Postfix) with ESMTP id AAE0580007 for ; Thu, 21 May 2020 13:25:19 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7409A52C7 for ; Thu, 21 May 2020 17:25:19 +0000 (UTC) X-FDA: 76841402358.19.crush76_85bfe585b3663 X-HE-Tag: crush76_85bfe585b3663 X-Filterd-Recvd-Size: 2799 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 May 2020 17:25:18 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C7CB2067B; Thu, 21 May 2020 17:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590081918; bh=vAo4QzwpoFgYhFQKi8shN2DAw/GCIUkoAg0u7koid4w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mma1o5WsQIScc1MuikrJ4qDvMkMce5c94pM4GHrfjLEFjwHZiw8Az6j6QUZVGH59i 4q6XkBQfVqhPj8dJl7DwHwbbj8poVnhg5KeZ7Bof8mUSpfWEt8GUMDUeboX3glfqsR ChAPSWW2rvzhmYqzPZHoTmLe5d+TdEVzhFZO/sOE= Date: Thu, 21 May 2020 10:25:16 -0700 From: Andrew Morton To: Michel Lespinasse Cc: Vlastimil Babka , linux-mm , 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 Subject: Re: [PATCH v6 12/12] mmap locking API: convert mmap_sem comments Message-Id: <20200521102516.01dbc9fcc539baba96224c3f@linux-foundation.org> In-Reply-To: References: <20200520052908.204642-1-walken@google.com> <20200520052908.204642-13-walken@google.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 21 May 2020 00:50:56 -0700 Michel Lespinasse wrote: > > > * Must be called holding task's alloc_lock to protect task's mems_allowed > > > - * and mempolicy. May also be called holding the mmap_semaphore for write. > > > + * and mempolicy. May also be called holding the mmap_lockaphore for write. > > > */ > > > static int mpol_set_nodemask(struct mempolicy *pol, > > > const nodemask_t *nodes, struct nodemask_scratch *nsc) > > > > :) > > Haha, good catch ! aww, you're all so cruel. The world would be a better place if Linux had lockaphores!