aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-03-09 14:35:58 -0400
committerJames Morris <jmorris@namei.org>2009-03-09 17:40:02 -0400
commitdf7f54c012b92ec93d56b68547351dcdf8a163d3 (patch)
tree07039542feca94d4d467c430521319950819a4e1 /security/selinux
parentdd34b5d75a0405814a3de83f02a44ac297e81629 (diff)
SELinux: inode_doinit_with_dentry drop no dentry printk
Drop the printk message when an inode is found without an associated dentry. This should only happen when userspace can't be accessing those inodes and those labels will get set correctly on the next d_instantiate. Thus there is no reason to send this message. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index cd3307a26d11..7c52ba243c64 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -1263,9 +1263,15 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
1263 dentry = d_find_alias(inode); 1263 dentry = d_find_alias(inode);
1264 } 1264 }
1265 if (!dentry) { 1265 if (!dentry) {
1266 printk(KERN_WARNING "SELinux: %s: no dentry for dev=%s " 1266 /*
1267 "ino=%ld\n", __func__, inode->i_sb->s_id, 1267 * this is can be hit on boot when a file is accessed
1268 inode->i_ino); 1268 * before the policy is loaded. When we load policy we
1269 * may find inodes that have no dentry on the
1270 * sbsec->isec_head list. No reason to complain as these
1271 * will get fixed up the next time we go through
1272 * inode_doinit with a dentry, before these inodes could
1273 * be used again by userspace.
1274 */
1269 goto out_unlock; 1275 goto out_unlock;
1270 } 1276 }
1271 1277