Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4660242yba; Tue, 30 Apr 2019 02:09:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrfF8zkFLl5fPV/5ywAoBYmP2FLWpSCwQ24X1nJqbMhTr/jeuqrkCjfV2uO8JRUGlFJKEA X-Received: by 2002:a17:902:8f88:: with SMTP id z8mr61430215plo.54.1556615357954; Tue, 30 Apr 2019 02:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556615357; cv=none; d=google.com; s=arc-20160816; b=CyfL9+zxmBj08i2XmoSfVlHHXSCVeIzd2HVTROplAbc51NCuJHnIT7gt3ieTXN2ohy PO7cjhcE/a1b45DyNuPrB2bHqN+WwHEqKxn2sVQk5nO/d2rE8n0xQLpgA3VBXF1MWELs Hvwn73H3KSUGkj0MLbVL67QqWUhJkFGZWsWfsDB26fKaqRa+KimDUXw755WGtVF42ubs 8G/bkcPgO3iE//h7En1RcWTxuPWjsB7eAodrUWwhsrRpOWUrzAWHyRumLFP+uLI/VcM2 9lqNiluGy1EhuUWTngh9jy986JVwf7d0ND3T2LuAmIuS2Tq37Sb+YnAGA9n5eI2Xx2gY BZAg== 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:dkim-signature; bh=9HjQ88MY4ZiDc1bI5n4MIBBh4bZ2A3E/q/QZEBk7alU=; b=WrDK2FUsgx0fAYcRUzj5xVjpCzvISOyUvXzGn5OUFiW1z42OYUhsAd2FsfFDRo3hD8 gpjUD1imKmncdQX8MANGyPy8j6bcnWCMMwxT15G9A8a/aTfqs7lL1smQ8ijkbyQFZqzD 8y/D5bl6VOy0TDkRzGqW9/+Txip2AJibln9hV2Afl8sG2fLepf8Dq7rsMxhG4A+BEX0M TF5jNwqaUUZHkZWrg0vclPUcHggmAB3TkUTjBqplHbhti6TZexGvVCPtq4XD2JwTVzE3 xhBW9CaIAYUDVcfz3X2SBQZXFOTa9W0Dilg2FBl8fheTMDMMupG6UMQ3ap1ci5RsH4bh XwKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KCIillAx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si34205984pgd.269.2019.04.30.02.09.01; Tue, 30 Apr 2019 02:09:17 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KCIillAx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726436AbfD3JIL (ORCPT + 99 others); Tue, 30 Apr 2019 05:08:11 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:36754 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbfD3JIL (ORCPT ); Tue, 30 Apr 2019 05:08:11 -0400 Received: by mail-lf1-f68.google.com with SMTP id u17so10279000lfi.3 for ; Tue, 30 Apr 2019 02:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9HjQ88MY4ZiDc1bI5n4MIBBh4bZ2A3E/q/QZEBk7alU=; b=KCIillAxrZrXB5w7B79fb19nYg7F3YCwf/ztmA9aoE9VUD7WLkEyGA1XTGj7Kk7I9I Q513ZwfxLRI6HJ4DrN1ZMjXfa842QSSs6yPwd0FUt+xZKwllptZpyag00LUFcGYK3EsC XdEbFchQbx1GNf/krTIlE74LPo3MefjF2xV0uZ5Rt9BcNTBf/J2/0tgE/CjrS+/46uwD ARjeDWBBqlnHHRKTKdiGH05RWZ9Qh2z5qOAaNQx9+9uWyCnSM+J6HGsn9mtkAkyisNb6 WLz5Pn17WNGE47oaQuTDdvGZvJ9oPYfrIEusa3M0SiUmfS8nh2ODl35nGOliRsB/77U5 zOrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9HjQ88MY4ZiDc1bI5n4MIBBh4bZ2A3E/q/QZEBk7alU=; b=CRs2/jDPmNgUUM1lD+017iprN+Uxzi4z7yp1t0bS55eSukG9f7VrrTMHfzQhhwBqDd Yfw1jRKUDIVXVMTSq9/LGeUJ+FVEQVmvEpXDx4hKld+qb+VrcUgKMC4MCf/wXlvCWirA ZjjICN/cBW3tvuqS1Eojvjb+cLZGy+2dLeoOOsLqaxZYSIHl/LWiocQKfR1nprRgvET/ Uojb2KhRFCrMVHh+xNuK7YScXZB5/IDKTbk5YBjMseBxeYjvUTtLJ3aEiGvMvJAgD/hQ YANyIuH8IJQbSQBFXTjblitW7H5vZ2zgOLHFy1e55nAAHRBDVVUXkUMZWlsghCJz7HW6 RNgQ== X-Gm-Message-State: APjAAAXEsdq5kpuBP2HyOIkpSLuE/QYr1LmUVq5rKUshcFIB350xrOID +YPci3TsxVRvnliG5mQ5uCc= X-Received: by 2002:a19:f50f:: with SMTP id j15mr36291099lfb.135.1556615289352; Tue, 30 Apr 2019 02:08:09 -0700 (PDT) Received: from uranus.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id u22sm1374696lji.40.2019.04.30.02.08.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 02:08:08 -0700 (PDT) Received: by uranus.localdomain (Postfix, from userid 1000) id 45A444603CA; Tue, 30 Apr 2019 12:08:08 +0300 (MSK) Date: Tue, 30 Apr 2019 12:08:08 +0300 From: Cyrill Gorcunov To: Kirill Tkhai Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , akpm@linux-foundation.org, arunks@codeaurora.org, brgl@bgdev.pl, geert+renesas@glider.be, ldufour@linux.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mguzik@redhat.com, mhocko@kernel.org, rppt@linux.ibm.com, vbabka@suse.cz Subject: Re: [PATCH 3/3] prctl_set_mm: downgrade mmap_sem to read lock Message-ID: <20190430090808.GC2673@uranus.lan> References: <20190418182321.GJ3040@uranus.lan> <20190430081844.22597-1-mkoutny@suse.com> <20190430081844.22597-4-mkoutny@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 11:55:45AM +0300, Kirill Tkhai wrote: > > - up_write(&mm->mmap_sem); > > + spin_unlock(&mm->arg_lock); > > + up_read(&mm->mmap_sem); > > return error; > > Hm, shouldn't spin_lock()/spin_unlock() pair go as a fixup to existing code > in a separate patch? > > Without them, the existing code has a problem at least in get_mm_cmdline(). Seems reasonable to merge it into patch 1.