Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4663773yba; Tue, 30 Apr 2019 02:13:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFTM7wmpZO37dIdhhlOKboG2jDA9BYgJ/89tpN2UvLc2pO/3xxeuGogS7bdJc/q1NO6Gb5 X-Received: by 2002:a17:902:8345:: with SMTP id z5mr14961925pln.255.1556615597703; Tue, 30 Apr 2019 02:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556615597; cv=none; d=google.com; s=arc-20160816; b=uauAEuLWld1VFrMDgJ86sccZKsJBLIPl+N51sdYnsjax38D3EDXZXutD8xMFp+lLMV n0dIplqxmjkOECmyugxMGW7WXbTd6GODwq333ULoLTcBJqEacGBqECjrvRGoqOIkgL++ j+CvOihOqaO3MxAmjBjg4CQTU44NJq5TmcxHYzPJt/B+RJjugAukd8JQrAYVJXK4qcYy pu3JxYEnYrKaQ5+Ls+EB5SD8sHTtU3pedKBzuCbiWGXhrbeeSn1/Fyi4BuYj9pi8Jf3K MbwaMT2tb3gCRYnJqbee9MeUoFDBLK2Y0JyRoqDrmbnPh+h1PH8x2azIsYdfBlelczq1 jkBg== 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=KTe3MPBcj9GYqzqNE1xWLm88jBqBFR7Ze5yRMgNlbMQ=; b=zCsUbuNyYru3OpCLv288c4WaHei97TNA6U3RZjLHBtw8KSj+olEdA7WS/8Og43agme 4b/rDn4qLN1XlXuz5EAg973U4jHt74fi+a3Gjuy82x6ql9WzGgBjCyL2/fa6w4cOQ4fG iZoJk8mOc+Xc/ZULDu9OCKZlCKRXvveZRreWCKox9M3L/61E5hqyFBvo+LxKA526aZBP Q+bbWhhun32knFiyeJyeyzEO41+GTvNKuJ9LDXO1g5u7g3ZE8i3e2NsxOBh6XErUpIFh cD76Q+vAW66R6a/UcoMI69lmSuOAwyMQPF54QccTEZArDn5AKOyH/Dh4IMconCD26f0J cO+Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si40551587pfc.223.2019.04.30.02.13.02; Tue, 30 Apr 2019 02:13: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbfD3JLp (ORCPT + 99 others); Tue, 30 Apr 2019 05:11:45 -0400 Received: from relay.sw.ru ([185.231.240.75]:39018 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfD3JLo (ORCPT ); Tue, 30 Apr 2019 05:11:44 -0400 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hLOnZ-0007Uk-Vy; Tue, 30 Apr 2019 12:11:38 +0300 Subject: Re: [PATCH 3/3] prctl_set_mm: downgrade mmap_sem to read lock To: Cyrill Gorcunov Cc: =?UTF-8?Q?Michal_Koutn=c3=bd?= , 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 References: <20190418182321.GJ3040@uranus.lan> <20190430081844.22597-1-mkoutny@suse.com> <20190430081844.22597-4-mkoutny@suse.com> <20190430090808.GC2673@uranus.lan> From: Kirill Tkhai Message-ID: <0a48e0a2-a282-159e-a56e-201fbc0faa91@virtuozzo.com> Date: Tue, 30 Apr 2019 12:11:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190430090808.GC2673@uranus.lan> 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 30.04.2019 12:08, Cyrill Gorcunov wrote: > 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. Sounds sensibly.