projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
selftests/bpf: fix bpf_loop_bench for new callback verification scheme
[platform/kernel/linux-starfive.git]
/
kernel
/
audit_watch.c
diff --git
a/kernel/audit_watch.c
b/kernel/audit_watch.c
index
65075f1
..
7a98cd1
100644
(file)
--- a/
kernel/audit_watch.c
+++ b/
kernel/audit_watch.c
@@
-527,11
+527,18
@@
int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
unsigned long ino;
dev_t dev;
unsigned long ino;
dev_t dev;
- exe_file = get_task_exe_file(tsk);
+ /* only do exe filtering if we are recording @current events/records */
+ if (tsk != current)
+ return 0;
+
+ if (!current->mm)
+ return 0;
+ exe_file = get_mm_exe_file(current->mm);
if (!exe_file)
return 0;
ino = file_inode(exe_file)->i_ino;
dev = file_inode(exe_file)->i_sb->s_dev;
fput(exe_file);
if (!exe_file)
return 0;
ino = file_inode(exe_file)->i_ino;
dev = file_inode(exe_file)->i_sb->s_dev;
fput(exe_file);
+
return audit_mark_compare(mark, ino, dev);
}
return audit_mark_compare(mark, ino, dev);
}