From: James Morris 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 --- security/selinux/selinuxfs.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -puN security/selinux/selinuxfs.c~selinuxfs-cleanups-sel_make_bools security/selinux/selinuxfs.c --- devel/security/selinux/selinuxfs.c~selinuxfs-cleanups-sel_make_bools 2006-02-27 20:57:58.000000000 -0800 +++ devel-akpm/security/selinux/selinuxfs.c 2006-02-27 20:57:58.000000000 -0800 @@ -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_b 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) { _