Skip to contentSkip to conversation

Use of i_security in fs/nfs/inode.c

DISCUSSION Casey Schaufler 1 participant 1 message Nov 24, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

There is a check for inode->i_security == NULL in nfs_setsecurity in fs/nfs/inode.c. What is the intent of this check? Are you looking for an uninitialized security blob, are you looking to see if there is an active security module or something else?

Is there any reason that you can see that a call to security_inode_getsecid() followed by a check to see if the secid == 0 would not be equivalent? I understand that the NULL check is faster, but it may not always be correct.