Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1677582ybh; Sun, 8 Mar 2020 10:08:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtZtp9wwcWLDL8e8/vQRezP0LCk0e/SizdFrt15wKV5Bdz8GRVE541LSsV/f+ldAH/K/Rkf X-Received: by 2002:a05:6808:aa8:: with SMTP id r8mr8613460oij.7.1583687320393; Sun, 08 Mar 2020 10:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583687320; cv=none; d=google.com; s=arc-20160816; b=LhPzJdir2SXbjXFUc5ex4OfxTMxAxiz05OQcBVXtcYmbSrCXaCIOumBQSWwcSNWNLv BxCrD5mCCUkJiqZmRjyCdXK8TFuMPFUgsWmhEX/xCIn9cglie013Jmi6IMRPYoScQ1R0 67dK/bkGp+i9sTDMI1tiLb4wgGcHTtNePrf4cT/OxEM3Fdol+gCbHKwn9zLIkAV9PQT3 TPZcZZvyca+QD+0iIYnRROOlejilD3bSLRM95LLRHF2WtfhXOH1Q0Ox96Gy8lYOCngLm fJr6M6q2ltTYHAQ6F4udBVaJQIR3caHyv1BF+EWZjJm2XKJ4QYA3Qyy1e54p5XCMFmxf xSuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EaEMosvcD3XT3owcZqre9kQ1lBd0Cm7bR4/s8tqqk60=; b=co/vmzNcd0DxcZ1Ywk1m4GnGZFf67QpKKi++ffXuPuoj9kq/849A8UJzw05Uwsmqw7 g2SNck96CutgXEZxzZ0CmHSYLJ4NDO3eoRf3gfIu/GlkRTKcJjp9BXkf8cb1wsrGC6Bs WG5sCtqBfnncNxwtyLtWdgfQu/BSUQBqoocP42m7WjZDs+aFg484RV7hLo+oh8Uz9z+w QusMKefFuooE4n5o2zlj6jDCMnQ+5DVmHFM03uNbPuBVEt2muMPCTLzhdZpndGgs0Rzm h+CMQvvn72s7OMcExIdTXPQmSvE7Jlztdty601dB7gb+t4UoMfgdlMj5sadATGVhSf7a FAUA== 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 h145si2595024oib.210.2020.03.08.10.08.28; Sun, 08 Mar 2020 10:08:40 -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 S1726382AbgCHRHy (ORCPT + 99 others); Sun, 8 Mar 2020 13:07:54 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:56146 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbgCHRHy (ORCPT ); Sun, 8 Mar 2020 13:07:54 -0400 Received: from ip5f5bf7ec.dynamic.kabel-deutschland.de ([95.91.247.236] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jAzP5-0006ws-FF; Sun, 08 Mar 2020 17:07:51 +0000 Date: Sun, 8 Mar 2020 18:07:50 +0100 From: Christian Brauner To: Corey Minyard Cc: minyard@acm.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Adrian Reber , Oleg Nesterov , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin Subject: Re: [PATCH v2] pid: Fix error return value in some cases Message-ID: <20200308170750.jhl5rxyy4ek5tl7l@wittgenstein> References: <20200306172314.12232-1-minyard@acm.org> <20200307110007.fmtaaqt2udsgohtp@wittgenstein> <20200307131136.GD2847@minyard.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200307131136.GD2847@minyard.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 07, 2020 at 07:11:36AM -0600, Corey Minyard wrote: > On Sat, Mar 07, 2020 at 12:00:07PM +0100, Christian Brauner wrote: > > On Fri, Mar 06, 2020 at 11:23:14AM -0600, minyard@acm.org wrote: > > > From: Corey Minyard > > > > > > Recent changes to alloc_pid() allow the pid number to be specified on > > > the command line. If set_tid_size is set, then the code scanning the > > > levels will hard-set retval to -EPERM, overriding it's previous -ENOMEM > > > value. > > > > > > After the code scanning the levels, there are error returns that do not > > > set retval, assuming it is still set to -ENOMEM. > > > > > > So set retval back to -ENOMEM after scanning the levels. > > > > > > Fixes: 49cb2fc42ce4 "fork: extend clone3() to support setting a PID" > > > Signed-off-by: Corey Minyard > > > Cc: # 5.5 > > > Cc: Adrian Reber > > > Cc: Christian Brauner > > > Cc: Oleg Nesterov > > > Cc: Dmitry Safonov <0x7f454c46@gmail.com> > > > Cc: Andrei Vagin > > > > Thanks! I've pulled the patch now and applied. Applied as: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/commit/?h=fixes&id=b26ebfe12f34f372cf041c6f801fa49c3fb382c5 Should show up in -next around Monday and I'll target it for rc6. Should then be backported to v5.5 rather soon! Thanks!