[PATCH] security: inode: fix a missing check for securityfs_create_file

James Morris jmorris at namei.org
Wed Apr 10 22:00:43 UTC 2019

On Wed, 10 Apr 2019, Al Viro wrote:

> 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},
> #endif
> 		{""}
> 	};
> and to hell with that call of securityfs_create_file() and all its
> failure handling...

Thanks for the review.  Reverted.

James Morris
<jmorris at namei.org>

More information about the Linux-security-module-archive mailing list