diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-24 21:31:02 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-05-14 09:51:42 -0400 |
commit | e919328810bca2ea3f7a224a34cbccd7baf826d5 (patch) | |
tree | 7bb4f42743564fbfbd5b79281952b5eb1643998a /security/selinux/hooks.c | |
parent | 2220c5b0a7fb7d7d00c9a0b1e5222a7ae1f35956 (diff) |
__inode_security_revalidate() never gets NULL opt_dentry
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4cafe6a19167..b02315183b2f 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -274,11 +274,10 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent | |||
274 | * Try reloading inode security labels that have been marked as invalid. The | 274 | * Try reloading inode security labels that have been marked as invalid. The |
275 | * @may_sleep parameter indicates when sleeping and thus reloading labels is | 275 | * @may_sleep parameter indicates when sleeping and thus reloading labels is |
276 | * allowed; when set to false, returns -ECHILD when the label is | 276 | * allowed; when set to false, returns -ECHILD when the label is |
277 | * invalid. The @opt_dentry parameter should be set to a dentry of the inode; | 277 | * invalid. The @dentry parameter should be set to a dentry of the inode. |
278 | * when no dentry is available, set it to NULL instead. | ||
279 | */ | 278 | */ |
280 | static int __inode_security_revalidate(struct inode *inode, | 279 | static int __inode_security_revalidate(struct inode *inode, |
281 | struct dentry *opt_dentry, | 280 | struct dentry *dentry, |
282 | bool may_sleep) | 281 | bool may_sleep) |
283 | { | 282 | { |
284 | struct inode_security_struct *isec = inode->i_security; | 283 | struct inode_security_struct *isec = inode->i_security; |
@@ -295,7 +294,7 @@ static int __inode_security_revalidate(struct inode *inode, | |||
295 | * @opt_dentry is NULL and no dentry for this inode can be | 294 | * @opt_dentry is NULL and no dentry for this inode can be |
296 | * found; in that case, continue using the old label. | 295 | * found; in that case, continue using the old label. |
297 | */ | 296 | */ |
298 | inode_doinit_with_dentry(inode, opt_dentry); | 297 | inode_doinit_with_dentry(inode, dentry); |
299 | } | 298 | } |
300 | return 0; | 299 | return 0; |
301 | } | 300 | } |