summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-12-28 09:27:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-01-25 23:16:27 -0500
commitf4a4a8b1252a08b60cde66a6622bbca4a7f4af2e (patch)
tree883f53870ed0ad1c9a3529e7cbfd009e2189e27f /kernel
parent5e9e2040247ac19a46d6627736ece726c46f1fdf (diff)
downloadop-kernel-dev-f4a4a8b1252a08b60cde66a6622bbca4a7f4af2e.zip
op-kernel-dev-f4a4a8b1252a08b60cde66a6622bbca4a7f4af2e.tar.gz
file->f_path.dentry is pinned down for as long as the file is open...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 072566d..55f82fc 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2405,7 +2405,6 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
struct audit_aux_data_bprm_fcaps *ax;
struct audit_context *context = current->audit_context;
struct cpu_vfs_cap_data vcaps;
- struct dentry *dentry;
ax = kmalloc(sizeof(*ax), GFP_KERNEL);
if (!ax)
@@ -2415,9 +2414,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
ax->d.next = context->aux;
context->aux = (void *)ax;
- dentry = dget(bprm->file->f_path.dentry);
- get_vfs_caps_from_disk(dentry, &vcaps);
- dput(dentry);
+ get_vfs_caps_from_disk(bprm->file->f_path.dentry, &vcaps);
ax->fcap.permitted = vcaps.permitted;
ax->fcap.inheritable = vcaps.inheritable;
OpenPOWER on IntegriCloud