summaryrefslogtreecommitdiffstats
path: root/kernel/audit.h
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2018-02-20 09:52:38 -0500
committerPaul Moore <paul@paul-moore.com>2018-02-23 11:22:22 -0500
commitce423631ce1f20564f818e7de6bc0eee0c01badd (patch)
tree8af35df7e249950085f24e6842b6d0058c6893c7 /kernel/audit.h
parent23138ead270045f1b3e912e667967b6094244999 (diff)
downloadlinux-stable-ce423631ce1f20564f818e7de6bc0eee0c01badd.tar.gz
linux-stable-ce423631ce1f20564f818e7de6bc0eee0c01badd.tar.bz2
linux-stable-ce423631ce1f20564f818e7de6bc0eee0c01badd.zip
audit: track the owner of the command mutex ourselves
Evidently the __mutex_owner() function was never intended for use outside the core mutex code, so build a thing locking wrapper around the mutex code which allows us to track the mutex owner. One, arguably positive, side effect is that this allows us to hide the audit_cmd_mutex inside of kernel/audit.c behind the lock/unlock functions. Reported-by: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'kernel/audit.h')
-rw-r--r--kernel/audit.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/audit.h b/kernel/audit.h
index af5bc59487ed..214e14948370 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -341,4 +341,5 @@ extern struct list_head *audit_killed_trees(void);
#define audit_filter_inodes(t,c) AUDIT_DISABLED
#endif
-extern struct mutex audit_cmd_mutex;
+extern void audit_ctl_lock(void);
+extern void audit_ctl_unlock(void);