提交 253a8b1d 编写于 作者: J James Morris 提交者: Linus Torvalds

[PATCH] selinuxfs cleanups: sel_make_bools

Remove the call to sel_make_bools() from sel_fill_super(), as policy needs to
be loaded before the boolean files can be created.  Policy will never be
loaded during sel_fill_super() as selinuxfs is kernel mounted during init and
the only means to load policy is via selinuxfs.

Also, the call to d_genocide() on the error path of sel_make_bools() is
incorrect and replaced with sel_remove_bools().
Signed-off-by: NJames Morris <jmorris@namei.org>
Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 161ce45a
...@@ -970,7 +970,7 @@ static int sel_make_bools(void) ...@@ -970,7 +970,7 @@ static int sel_make_bools(void)
return ret; return ret;
err: err:
kfree(values); kfree(values);
d_genocide(dir); sel_remove_bools(dir);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
...@@ -1226,9 +1226,6 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) ...@@ -1226,9 +1226,6 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent)
goto err; goto err;
bool_dir = dentry; bool_dir = dentry;
ret = sel_make_bools();
if (ret)
goto err;
dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME); dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME);
if (!dentry) { if (!dentry) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册