diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 17:49:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-22 17:49:23 -0400 |
commit | 27cf3a16b2535a490f8cf1d29a6634f1c70f7831 (patch) | |
tree | 1ffe10cfb312471d09912e74e2ef8f721618be2b /kernel/auditsc.c | |
parent | a62d016cece2fce1d5e4eedf36b17f03a7a5c78e (diff) | |
parent | 724e7bfcc566375158219c1454b4b6fc416b2c4a (diff) |
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit
Pull audit fixes from Paul Moore:
"Seven audit patches for v4.1, all bug fixes.
The largest, and perhaps most significant commit helps resolve some
memory pressure issues related to the inode cache and audit, there are
also a few small commits which help resolve some timing issues with
the audit log queue, and the rest fall into the always popular "code
clean-up" category.
In general, nothing really substantial, just a nice set of maintenance
patches"
* 'upstream' of git://git.infradead.org/users/pcmoore/audit:
audit: Remove condition which always evaluates to false
audit: reduce mmap_sem hold for mm->exe_file
audit: consolidate handling of mm->exe_file
audit: code clean up
audit: don't reset working wait time accidentally with auditd
audit: don't lose set wait time on first successful call to audit_log_start()
audit: move the tree pruning to a dedicated thread
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index dc4ae70a7413..84c74d08c62b 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -2361,7 +2361,6 @@ static void audit_log_task(struct audit_buffer *ab) | |||
2361 | kuid_t auid, uid; | 2361 | kuid_t auid, uid; |
2362 | kgid_t gid; | 2362 | kgid_t gid; |
2363 | unsigned int sessionid; | 2363 | unsigned int sessionid; |
2364 | struct mm_struct *mm = current->mm; | ||
2365 | char comm[sizeof(current->comm)]; | 2364 | char comm[sizeof(current->comm)]; |
2366 | 2365 | ||
2367 | auid = audit_get_loginuid(current); | 2366 | auid = audit_get_loginuid(current); |
@@ -2376,13 +2375,7 @@ static void audit_log_task(struct audit_buffer *ab) | |||
2376 | audit_log_task_context(ab); | 2375 | audit_log_task_context(ab); |
2377 | audit_log_format(ab, " pid=%d comm=", task_pid_nr(current)); | 2376 | audit_log_format(ab, " pid=%d comm=", task_pid_nr(current)); |
2378 | audit_log_untrustedstring(ab, get_task_comm(comm, current)); | 2377 | audit_log_untrustedstring(ab, get_task_comm(comm, current)); |
2379 | if (mm) { | 2378 | audit_log_d_path_exe(ab, current->mm); |
2380 | down_read(&mm->mmap_sem); | ||
2381 | if (mm->exe_file) | ||
2382 | audit_log_d_path(ab, " exe=", &mm->exe_file->f_path); | ||
2383 | up_read(&mm->mmap_sem); | ||
2384 | } else | ||
2385 | audit_log_format(ab, " exe=(null)"); | ||
2386 | } | 2379 | } |
2387 | 2380 | ||
2388 | /** | 2381 | /** |