Skip to content

Commit fe9fd2e

Browse files
author
James Morris
committed
Revert "security: inode: fix a missing check for securityfs_create_file"
This reverts commit d1a0846. From Al Viro: "Rather bad way to do it - generally, register_filesystem() should be the last thing done by initialization. Any modular code that does unregister_filesystem() on failure exit is flat-out broken; here it's not instantly FUBAR, but it's a bloody bad example. What's more, why not let simple_fill_super() do it? Just static int fill_super(struct super_block *sb, void *data, int silent) { static const struct tree_descr files[] = { {"lsm", &lsm_ops, 0444}, {""} }; and to hell with that call of securityfs_create_file() and all its failure handling..." Signed-off-by: James Morris <[email protected]>
1 parent ecb8e74 commit fe9fd2e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

security/inode.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,6 @@ static int __init securityfs_init(void)
339339
#ifdef CONFIG_SECURITY
340340
lsm_dentry = securityfs_create_file("lsm", 0444, NULL, NULL,
341341
&lsm_ops);
342-
if (IS_ERR(lsm_dentry)) {
343-
unregister_filesystem(&fs_type);
344-
sysfs_remove_mount_point(kernel_kobj, "security");
345-
return PTR_ERR(lsm_dentry);
346-
}
347342
#endif
348343
return 0;
349344
}

0 commit comments

Comments
 (0)