summaryrefslogtreecommitdiffstats
path: root/security/smack/smackfs.c
diff options
context:
space:
mode:
authorCasey Schaufler <casey@schaufler-ca.com>2012-05-23 17:46:58 -0700
committerCasey Schaufler <casey@schaufler-ca.com>2012-07-13 15:49:23 -0700
commiteb982cb4cf6405b97ea1f9e1d10864981f269d46 (patch)
tree8d89448e0ef96d587ea8052021a721e632b4b318 /security/smack/smackfs.c
parent417c6c8ee2eb6975f357d8975af94ba5fbeaf82d (diff)
downloadop-kernel-dev-eb982cb4cf6405b97ea1f9e1d10864981f269d46.zip
op-kernel-dev-eb982cb4cf6405b97ea1f9e1d10864981f269d46.tar.gz
Smack: fix smack_new_inode bogosities
In January of 2012 Al Viro pointed out three bits of code that he titled "new_inode_smack bogosities". This patch repairs these errors. 1. smack_sb_kern_mount() included a NULL check that is impossible. The check and NULL case are removed. 2. smack_kb_kern_mount() included pointless locking. The locking is removed. Since this is the only place that lock was used the lock is removed from the superblock_smack structure. 3. smk_fill_super() incorrectly and unnecessarily set the Smack label for the smackfs root inode. The assignment has been removed. Targeted for git://gitorious.org/smack-next/kernel.git Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r--security/smack/smackfs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 1810c9a..3686db7 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -2051,7 +2051,6 @@ static int smk_fill_super(struct super_block *sb, void *data, int silent)
}
root_inode = sb->s_root->d_inode;
- root_inode->i_security = new_inode_smack(smack_known_floor.smk_known);
return 0;
}
OpenPOWER on IntegriCloud