]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Smack: fix smack_new_inode bogosities
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 24 May 2012 00:46:58 +0000 (17:46 -0700)
committerCasey Schaufler <cschaufler@cschaufler-intel.(none)>
Sun, 27 May 2012 19:52:19 +0000 (12:52 -0700)
commitbb9bbb144425f1d7f5096e1c69010d4103a6f3f7
treef04de922558bdc592ecd3e604993eff4cb94f096
parent7aab79999335a969d2f31a3ffdf3d6ef5cadd1ea
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>
security/smack/smack.h
security/smack/smack_lsm.c
security/smack/smackfs.c