From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbcACA7V (ORCPT ); Sat, 2 Jan 2016 19:59:21 -0500 Received: from h2.hallyn.com ([78.46.35.8]:55154 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbcACA7T (ORCPT ); Sat, 2 Jan 2016 19:59:19 -0500 Date: Sat, 2 Jan 2016 18:59:16 -0600 From: "Serge E. Hallyn" To: Jeremiah Mahler , "Serge E. Hallyn" , Tejun Heo , cgroups@vger.kernel.org, Stephen Rothwell , linux-kernel@vger.kernel.org, Dan Williams Subject: Re: cgroup: BUG: unable to handle kernel NULL pointer dereference Message-ID: <20160103005916.GA5956@mail.hallyn.com> References: <20160101234028.GA1750@hudson.localdomain> <20160102115437.GE3660@htj.duckdns.org> <20160102182416.GA3957@mail.hallyn.com> <20160102215049.GA18564@hudson.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160102215049.GA18564@hudson.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 02, 2016 at 01:50:49PM -0800, Jeremiah Mahler wrote: > Serge, > > On Sat, Jan 02, 2016 at 12:24:16PM -0600, Serge E. Hallyn wrote: > [...] > > > > Tried to reproduce with setting CONFIG_CFQ_GROUP_IOSCHED=y, but did not > > succeed. Could you send me the .config? Also, if someone could send > > the objdump -d output that might help. Though really, it seems clear > > that current->nsproxy must be NULL. Hm, that's right - we used to have > > that issue in pidns (or was it netns) during process exit. I don't know > > that I'll get time this afternoon, but I'll look into it asap. > > > > thanks. > > Attached is the .config I used. I can send an objdump, but do you want > a dump of the kernel, where the cgroup code is? > > -- > - Jeremiah Mahler Thanks - Shoulda looked at the exit path before - exit_io_context is called after exit_task_namespaces(). I'll have to figure out the best way to handle this. In the past we've restructured exit code to ensure that anything wanting to dereference nsproxy happened before exit_task_namespaces(). However, this is only happening in a debug stmt at blkg_path() in http://lxr.free-electrons.com/source/include/linux/blk-cgroup.h#L344 so simply returning the init_cgroup_namespace is actually the right thing to do. I'm tempted to add a init_cgroup_path() which ignores namespaces, for use in debugging statements.