lkml.org 
[lkml]   [2014]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: 3.15 regression: wrong cgroup magic
From
On Mon, Jun 2, 2014 at 5:56 PM, Andy Lutomirski <luto@amacapital.net> 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 <linux/vmalloc.h> /* TODO: replace with more sophisticated array */
#include <linux/kthread.h>
#include <linux/delay.h>
+#include <linux/magic.h>

#include <linux/atomic.h>

@@ -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


\
 
 \ /
  Last update: 2014-06-03 04:01    [W:0.180 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site