From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v2 1/3] cgroup: Iterate tasks that did not finish do_exit() Date: Wed, 12 Feb 2020 17:03:06 -0500 Message-ID: <20200212220306.GH80993@mtj.thefacebook.com> References: <20200120145635.GA30904@blackbody.suse.cz> <20200124114017.8363-1-mkoutny@suse.com> <20200124114017.8363-2-mkoutny@suse.com> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=vktZgdwHT9wecNxCGbvMxpCvSL0TwzAxN3Sq+MPR+iE=; b=nfgfpDftMtMJpWLxiSSs1X2OYcR9WlCI1amDpodmsLKxPgHkq8bnF4qf1qtxMLl199 uWMc6cYmIs/jgWcwFKkmA1JHNWG82eW/IKsMlZpt3mUHo1pedk+LHU2F5vGJTvd7qkuE fNGTvtRWPXIit3HMzALvF1UOg3gvWURxXh51WA1HcgiQsiQD6P2hroKRk0XCvfHR6Dzc dUViLRXSEg/GOVAWO3L349vTzL+TvRhuWrvH/RL4CyOMUBipTQvLtVcjhMg5rGBxSPCP gHaie3hPJkpPL/U0oSQ8fkXX54m7zGqVd3HOJjXK3WbYxhlGgnFofw7ctLXn1muu7S9S mjSg== Content-Disposition: inline In-Reply-To: <20200124114017.8363-2-mkoutny-IBi9RG/b67k@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, alex.shi-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org, guro-b10kYP2dOMg@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org, linger.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, shuah-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, tomcherry-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org On Fri, Jan 24, 2020 at 12:40:15PM +0100, Michal Koutn=FD wrote: > PF_EXITING is set earlier than actual removal from css_set when a task > is exitting. This can confuse cgroup.procs readers who see no PF_EXITING > tasks, however, rmdir is checking against css_set membership so it can > transitionally fail with EBUSY. >=20 > Fix this by listing tasks that weren't unlinked from css_set active > lists. > It may happen that other users of the task iterator (without > CSS_TASK_ITER_PROCS) spot a PF_EXITING task before cgroup_exit(). This > is equal to the state before commit c03cd7738a83 ("cgroup: Include dying > leaders with live threads in PROCS iterations") but it may be reviewed > later. >=20 > Reported-by: Suren Baghdasaryan > Fixes: c03cd7738a83 ("cgroup: Include dying leaders with live threads in = PROCS iterations") > Signed-off-by: Michal Koutn=FD Applied to cgroup/for-5.6-fixes. Thanks. --=20 tejun