Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2181797ybx; Fri, 8 Nov 2019 00:57:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzzogTnaPVGFHKmd2ASgCOYU0DZyl0xapuaNRMY3BFiktVdugkXhKZ/OSx9jNrAaYCe4ssG X-Received: by 2002:a05:6402:1397:: with SMTP id b23mr8940771edv.196.1573203430256; Fri, 08 Nov 2019 00:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573203430; cv=none; d=google.com; s=arc-20160816; b=yXPE4U6onmMIzvJd1+cfnByJXwyrjlWB9atJYMaptIMbWciAz5qqvHv70VNyoSnakh SGGBT2xvLoB9liCifleQs/KIT3V6trIVhRpwxd3XPKsUL0ishamAcYPCjOVUr+s4tujV yFE2DfX1vaFX5weP4A7H7NT9e4XASQnHbBggxkB/s7e0cEfwonUsr8f70Dq9JHE6xvsd ftO9Q4ciC841aH9vzMU+r3a3ZFD26HGQCIAskPBNlozHvgpFFa09bgFa3/P6NQuTS7Fu 2Kgmg4ijLBomr8dKQAmRlpo5hJMrZ6LBin3NxdGMZ5dpMmf1pBvFX1yc5ecvu2YveYIL 0ykA== 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=Or2/+E9FErKd2G7RhRUli6ElkDPweN4awgEVBKT4m7U=; b=l9kfFLDO0aC1JG7PgdNQknuAyIT80nS4h9x1us8QMIGdPOutBXLhh0XjoKOPNnhaSB I+/WbVCEAhOjfgsUsE1TeICtFkmtlHVye1EF6LuW/N12DQUbYfTRVQtSsiWFNH8TbaJk qLgSMPAjTjEfbTYwhEOP7AjEx1BxnYpjUv1m/4rAHfLSwtfTBufebUXO2ZSd9eaW8Ffv lya38q+md6yHRin3c2kJm6Trlds33OREY06fXIMGUwyfulKn5Jbya0xsXQrSgkM1VuXb 2W+yqlbWLItU4uyICAbXK8ylm844OCET9Kte/MykJn7SmNxVQNZJDUCkhweLzL8bKTwF 3dJQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si3338163ejm.165.2019.11.08.00.56.44; Fri, 08 Nov 2019 00:57:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730254AbfKHIxk (ORCPT + 99 others); Fri, 8 Nov 2019 03:53:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:40428 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726072AbfKHIxk (ORCPT ); Fri, 8 Nov 2019 03:53:40 -0500 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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