summaryrefslogtreecommitdiffstats
path: root/security/lsm_audit.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2021-02-17 14:04:39 +0100
committerIngo Molnar <mingo@kernel.org>2021-02-17 14:04:39 +0100
commited3cd45f8ca873dd320ff7e6b4c1c8f83a65302c (patch)
tree783a02c1e78964654fe6d9a9c14b24bfc50e6b3b /security/lsm_audit.c
parentsched/fair: Move avg_scan_cost calculations under SIS_PROP (diff)
parentLinux 5.11 (diff)
downloadlinux-ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c.tar.xz
linux-ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c.zip
Merge tag 'v5.11' into sched/core, to pick up fixes & refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'security/lsm_audit.c')
-rw-r--r--security/lsm_audit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 7d8026f3f377..a0cd28cd31a8 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -275,7 +275,9 @@ static void dump_common_audit_data(struct audit_buffer *ab,
struct inode *inode;
audit_log_format(ab, " name=");
+ spin_lock(&a->u.dentry->d_lock);
audit_log_untrustedstring(ab, a->u.dentry->d_name.name);
+ spin_unlock(&a->u.dentry->d_lock);
inode = d_backing_inode(a->u.dentry);
if (inode) {
@@ -293,8 +295,9 @@ static void dump_common_audit_data(struct audit_buffer *ab,
dentry = d_find_alias(inode);
if (dentry) {
audit_log_format(ab, " name=");
- audit_log_untrustedstring(ab,
- dentry->d_name.name);
+ spin_lock(&dentry->d_lock);
+ audit_log_untrustedstring(ab, dentry->d_name.name);
+ spin_unlock(&dentry->d_lock);
dput(dentry);
}
audit_log_format(ab, " dev=");