Skip to content
Commit 3e25eb9c authored by Al Viro's avatar Al Viro
Browse files

securityfs: fix object creation races



inode needs to be fully set up before we feed it to d_instantiate().
securityfs_create_file() does *not* do so; it sets ->i_fop and
->i_private only after we'd exposed the inode.  Unfortunately,
that's done fairly deep in call chain, so the amount of churn
is considerable.  Helper functions killed by substituting into
their solitary call sites, dead code removed.  We finally can
bury default_file_ops, now that the final value of ->i_fop is
available (and assigned) at the point where inode is allocated.

Reviewed-by: default avatarJames Morris <jmorris@namei.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e4e11180
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment