From 253a8b1db1af146d3a7eef0f3626781df12c7141 Mon Sep 17 00:00:00 2001 From: James Morris Date: Wed, 22 Mar 2006 00:09:18 -0800 Subject: [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: James Morris Acked-by: Stephen Smalley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- security/selinux/selinuxfs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'security') diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 1bfb40701b5a..ab7c9935c29a 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -970,7 +970,7 @@ out: return ret; err: kfree(values); - d_genocide(dir); + sel_remove_bools(dir); ret = -ENOMEM; goto out; } @@ -1226,9 +1226,6 @@ static int sel_fill_super(struct super_block * sb, void * data, int silent) goto err; bool_dir = dentry; - ret = sel_make_bools(); - if (ret) - goto err; dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME); if (!dentry) { -- cgit v1.2.2