diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 7a630a8a5cef..9a220be17a3f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2635,7 +2635,7 @@ static int selinux_inode_follow_link(struct dentry *dentry, struct nameidata *na | |||
2635 | return dentry_has_perm(cred, NULL, dentry, FILE__READ); | 2635 | return dentry_has_perm(cred, NULL, dentry, FILE__READ); |
2636 | } | 2636 | } |
2637 | 2637 | ||
2638 | static int selinux_inode_permission(struct inode *inode, int mask) | 2638 | static int selinux_inode_permission(struct inode *inode, int mask, unsigned flags) |
2639 | { | 2639 | { |
2640 | const struct cred *cred = current_cred(); | 2640 | const struct cred *cred = current_cred(); |
2641 | struct common_audit_data ad; | 2641 | struct common_audit_data ad; |
@@ -2649,6 +2649,10 @@ static int selinux_inode_permission(struct inode *inode, int mask) | |||
2649 | if (!mask) | 2649 | if (!mask) |
2650 | return 0; | 2650 | return 0; |
2651 | 2651 | ||
2652 | /* May be droppable after audit */ | ||
2653 | if (flags & IPERM_FLAG_RCU) | ||
2654 | return -ECHILD; | ||
2655 | |||
2652 | COMMON_AUDIT_DATA_INIT(&ad, FS); | 2656 | COMMON_AUDIT_DATA_INIT(&ad, FS); |
2653 | ad.u.fs.inode = inode; | 2657 | ad.u.fs.inode = inode; |
2654 | 2658 | ||