aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 29e090cc0e46..f4a7756f999c 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1151,7 +1151,6 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
1151 const struct cred *cred; 1151 const struct cred *cred;
1152 char name[sizeof(tsk->comm)]; 1152 char name[sizeof(tsk->comm)];
1153 struct mm_struct *mm = tsk->mm; 1153 struct mm_struct *mm = tsk->mm;
1154 struct vm_area_struct *vma;
1155 char *tty; 1154 char *tty;
1156 1155
1157 if (!ab) 1156 if (!ab)
@@ -1191,16 +1190,8 @@ void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
1191 1190
1192 if (mm) { 1191 if (mm) {
1193 down_read(&mm->mmap_sem); 1192 down_read(&mm->mmap_sem);
1194 vma = mm->mmap; 1193 if (mm->exe_file)
1195 while (vma) { 1194 audit_log_d_path(ab, " exe=", &mm->exe_file->f_path);
1196 if ((vma->vm_flags & VM_EXECUTABLE) &&
1197 vma->vm_file) {
1198 audit_log_d_path(ab, " exe=",
1199 &vma->vm_file->f_path);
1200 break;
1201 }
1202 vma = vma->vm_next;
1203 }
1204 up_read(&mm->mmap_sem); 1195 up_read(&mm->mmap_sem);
1205 } 1196 }
1206 audit_log_task_context(ab); 1197 audit_log_task_context(ab);