Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbaFCBPj (ORCPT ); Mon, 2 Jun 2014 21:15:39 -0400 Received: from mail-vc0-f179.google.com ([209.85.220.179]:44992 "EHLO mail-vc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058AbaFCBPh (ORCPT ); Mon, 2 Jun 2014 21:15:37 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 2 Jun 2014 18:15:36 -0700 X-Google-Sender-Auth: oCWRqSe1DAOgpgotwJ4I1eflD1c Message-ID: Subject: Re: 3.15 regression: wrong cgroup magic From: Linus Torvalds To: Andy Lutomirski Cc: "linux-kernel@vger.kernel.org" , Tejun Heo , Li Zefan , Linux FS Devel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 2, 2014 at 5:56 PM, Andy Lutomirski wrote: > > In particular, this piece: > > - sb->s_magic = CGROUP_SUPER_MAGIC; > > The result is that cgroup shows up with the wrong magic number, so my > code goes "oh crap, cgroupfs isn't mounted" and fails. > > I can change my code to hack around this, but I can imagine other > things getting tripped up. Is there still time to fix this? Sure. Send me a tested patch. I'm assuming it's going to look something like --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -54,6 +54,7 @@ #include /* TODO: replace with more sophisticated array */ #include #include +#include #include @@ -1607,6 +1608,8 @@ out_unlock: dentry = kernfs_mount(fs_type, flags, root->kf_root, &new_sb); if (IS_ERR(dentry) || !new_sb) cgroup_put(&root->cgrp); + else + dentry->d_sb->s_magic = CGROUP_SUPER_MAGIC; return dentry; } but somebody definitely needs to test it. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/