Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp548010ybl; Wed, 29 Jan 2020 05:27:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzAhCyaQ2I/MMPq2/YmLWSHT6TgHbTPOdtnhimM+Y7WaR571ccZr1y8kJuYSYx+be8nazPO X-Received: by 2002:a05:6808:191:: with SMTP id w17mr6159070oic.29.1580304474997; Wed, 29 Jan 2020 05:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580304474; cv=none; d=google.com; s=arc-20160816; b=iDVXAj6leDQkPunxYffwboLuUsI0U75tE7EqPKAxjV4m+kQFltN9U0vruNdWIGndu3 fFPqTFxbJ+u3v5QIIWlZRpzDRi9dW757SodjaRmPPvi3lAPG4649OCB7GX0WKLpyrCPM POM1ff7uSzehdyu5Way2tm/dr5HsXi/8vcRSWii1np2zXMYhmIDPzGueG5CUmhbP2HZM mvicKuSpgqtkIp6JMJ3jlS08sQeNzNT2cmspAkj7BpYK1lNxr1wDUbSIiLI69cLkLTDH ZDHzxcSgoj5ErWDq8/EvNRcHyHkH5jfUM04eYmwiDC2w9WK8dAbQUX0UreCLLPvoj7yA E+wQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=JhjWs1QrGs6VG/CUghSurXeabC4948hXOhmNaTbdfu4=; b=BzJF2s9mb0oEUtlMg9WOKXNTyCoTiqKXlCyGVIU2IR2wCwXCBpcofNIeUlruevAQgK dBk/nAqJxlXZS747AQmlCJTC4HW7iAMtb8T8QUphAJULn4/o2PeUUyASgkQ6FGIhH9zJ QiHuQ4BfPMMHAJ48Hf/F0i/rBXB01lGPmOsIGKucdrktFHfNTxJyg7cnRcuZ8tKySYAq o2W9ecrqGJYQbok9juf7Jkrnvoq/Pm57+Nod5bKF2gZbNleAkdfIRySyMdOB6jnjGcwG htcpmD6CdmwYpBpTVX/9lcRZ5X3qWCOlfflOCiZ4wEtX4QbXwqAWArrL2DPr3pFN/rhT Z2ng== 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 t19si1235806oth.312.2020.01.29.05.27.41; Wed, 29 Jan 2020 05:27:54 -0800 (PST) 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 S1726735AbgA2N0M (ORCPT + 99 others); Wed, 29 Jan 2020 08:26:12 -0500 Received: from mx2.suse.de ([195.135.220.15]:53448 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbgA2N0L (ORCPT ); Wed, 29 Jan 2020 08:26:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AD428AD07; Wed, 29 Jan 2020 13:26:09 +0000 (UTC) Date: Wed, 29 Jan 2020 14:26:08 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Christian Brauner Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Oleg Nesterov , Johannes Weiner , Li Zefan , cgroups@vger.kernel.org Subject: Re: [PATCH v5 3/6] cgroup: refactor fork helpers Message-ID: <20200129132608.GC11384@blackbody.suse.cz> References: <20200121154844.411-1-christian.brauner@ubuntu.com> <20200121154844.411-4-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200121154844.411-4-christian.brauner@ubuntu.com> 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 Tue, Jan 21, 2020 at 04:48:41PM +0100, Christian Brauner wrote: > diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c > index 9b3241d67592..ce2d5b8aa19f 100644 > --- a/kernel/cgroup/cgroup.c > +++ b/kernel/cgroup/cgroup.c > @@ -5895,17 +5895,21 @@ static struct cgroup *cgroup_get_from_file(struct file *f) > > /** > * cgroup_can_fork - called on a new task before the process is exposed > - * @child: the task in question. > + * @child: the child process > + * @kargs: the arguments passed to create the child process This comment should only come with the later commmits. > - * cgroup_cancel_fork - called if a fork failed after cgroup_can_fork() > - * @child: the task in question > - * > - * This calls the cancel_fork() callbacks if a fork failed *after* > - * cgroup_can_fork() succeded. > - */ > + * cgroup_cancel_fork - called if a fork failed after cgroup_can_fork() > + * @child: the child process > + * @kargs: the arguments passed to create the child process Ditto > - * cgroup_post_fork - called on a new task after adding it to the task list > - * @child: the task in question > - * > - * Adds the task to the list running through its css_set if necessary and > - * call the subsystem fork() callbacks. Has to be after the task is > - * visible on the task list in case we race with the first call to > - * cgroup_task_iter_start() - to guarantee that the new task ends up on its > - * list. > + * cgroup_post_fork - finalize cgroup setup for the child process > + * @child: the child process > + * @kargs: the arguments passed to create the child process One more. Besides the misrebased comments Acked-by: Michal Koutn?