From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EECA1FA372C for ; Fri, 8 Nov 2019 08:53:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE616218AE for ; Fri, 8 Nov 2019 08:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE616218AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 530026B0007; Fri, 8 Nov 2019 03:53:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E0A56B0008; Fri, 8 Nov 2019 03:53:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F6516B000A; Fri, 8 Nov 2019 03:53:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id 28D826B0007 for ; Fri, 8 Nov 2019 03:53:41 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id C32A2180AD815 for ; Fri, 8 Nov 2019 08:53:40 +0000 (UTC) X-FDA: 76132497000.22.tiger79_2013b568afb45 X-HE-Tag: tiger79_2013b568afb45 X-Filterd-Recvd-Size: 2592 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 08:53:40 +0000 (UTC) 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 BD938B219; Fri, 8 Nov 2019 08:53:38 +0000 (UTC) Date: Fri, 8 Nov 2019 09:53:37 +0100 From: Michal Hocko To: Roman Gushchin Cc: "linux-mm@kvack.org" , Andrew Morton , Johannes Weiner , "linux-kernel@vger.kernel.org" , Kernel Team , "stable@vger.kernel.org" , Tejun Heo Subject: Re: [PATCH 1/2] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm() Message-ID: <20191108085337.GA15658@dhcp22.suse.cz> References: <20191106225131.3543616-1-guro@fb.com> <20191107122125.GS8314@dhcp22.suse.cz> <20191107164236.GB2919@castle.dhcp.thefacebook.com> <20191107170200.GX8314@dhcp22.suse.cz> <20191107224107.GA8219@castle.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191107224107.GA8219@castle.DHCP.thefacebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 07-11-19 22:41:13, Roman Gushchin wrote: > On Thu, Nov 07, 2019 at 06:02:00PM +0100, Michal Hocko wrote: > > On Thu 07-11-19 16:42:41, Roman Gushchin wrote: [...] > > > It's an exiting task with the PF_EXITING flag set and it's in their late stages > > > of life. > > > > This is a signal delivery path AFAIU (get_signal) and the coredumping > > happens before do_exit. My understanding is that that unlinking > > happens from cgroup_exit. So either I am misreading the backtrace or > > there is some other way to leave cgroups or there is something more > > going on. > > Yeah, you're right. I have no better explanation for this and the similar, > mentioned in the commit bsd accounting issue, Tejun mentioned bsd accounting issue as well, but I do not see any explicit reference to it in neither of the two patches. > than some very rare race condition > that allows cgroups to be offlined with a task inside. > > I'll think more about it. Thanks a lot. As I've said, I am not opposing this change once we have a proper changelog but I find the explanation really weak. If there is a race then it should be fixed as well. Thanks! -- Michal Hocko SUSE Labs