Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4250640yba; Wed, 17 Apr 2019 07:43:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxahONuFAwn5RaYDf54h2Em0txP89v/7AI3JSM91NcfbTx9iNt5Ab1W1UyJvZNbXnFvikG+ X-Received: by 2002:a63:b48:: with SMTP id a8mr74719299pgl.368.1555512195349; Wed, 17 Apr 2019 07:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555512195; cv=none; d=google.com; s=arc-20160816; b=IaLJcTHF7hwWKhPsir3tkO/IIbUTUg/nS7NtwyxKimN27onfK1bIuoaZMoZr7A+ClG NdWUXdfdGUEUMzgh9PzK+2jyqQSO3Y9C/Eb6Q151/J994FDlochqUaBUmRA/Mc2wAbg+ QtdBkkYudN+MJlXdEOqepG+9F+vk8LKpbWbUC6B5wiIJmCjpUqKs9Seqc99k4kRrXmFR qlLCIIcBQzJMJAN/aPD8aVN7pcujOnew7TtxhXuJ9DirTp8t7AGjlESbs0A3rfG1Unxx OE9I35gPGee1RT3v7Ptig6KlUJ2M6pbJ7jkkQaPLvDWSLvlpc1rFqz7JApBTz6/Vpakd qqLw== 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; bh=kxOwMzbnfT/mmZBXXgRgVBLUWfetHopux5wfWVeKtSQ=; b=bja+V5Tc7p+sz9UOJ2VEKZvCkXjE08e3PGMh6hTsQYzSUHscAAhi3fKnFsGxctX2wE /MCq6agTpys706GWhrLYbYvBcAyn7tDOhT+0JlfMRNO/ZmF93mBHvEasZ/vlAa5BHPO0 qdBuf4TKNWNDLigP6KAhX69BapZ9R4XUu2ldguU57gnjevsJWrAEGVeq9IBA9Zev7jxM RwSGUmr4JW+WPyW6pPsKc6NHZpAoyrLnbcYQ1c8HnD2DpZnM7XGPsf0geS/UGCtavoJc ySbin6LmP5Twq1HILWNNUSQ8H352cebHolU09ydiknTpVY4JjTfBlIiC89EyG0/yjkk5 yZqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si50265766plr.204.2019.04.17.07.43.00; Wed, 17 Apr 2019 07:43:15 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732357AbfDQOlp (ORCPT + 99 others); Wed, 17 Apr 2019 10:41:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:55188 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731743AbfDQOlp (ORCPT ); Wed, 17 Apr 2019 10:41:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F0045AEEA; Wed, 17 Apr 2019 14:41:43 +0000 (UTC) Date: Wed, 17 Apr 2019 16:41:42 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Michal Hocko Cc: Bartosz Golaszewski , Arun KS , Geert Uytterhoeven , linux-mm@kvack.org, Andrew Morton , Mike Rapoport , Mateusz Guzik , Vlastimil Babka , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: get_cmdline use arg_lock instead of mmap_sem Message-ID: <20190417144142.GF8962@blackbody.suse.cz> References: <20190417120347.15397-1-mkoutny@suse.com> <20190417134152.GM5878@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190417134152.GM5878@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 17, 2019 at 03:41:52PM +0200, Michal Hocko wrote: > Don't we need to use the lock in prctl_set_mm as well then? Correct. The patch alone just moves the race from get_cmdline/prctl_set_mm_map to get_cmdline/prctl_set_mm. arg_lock could be used in prctl_set_mm but the better idea (IMO) is complete removal of that code in favor of prctl_set_mm_map [1]. Michal [1] https://lore.kernel.org/lkml/20180405182651.GM15783@uranus.lan/