diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index fb83c5cb8c32..105147631753 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -817,6 +817,8 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts | |||
817 | audit_log_format(ab, " success=%s exit=%ld", | 817 | audit_log_format(ab, " success=%s exit=%ld", |
818 | (context->return_valid==AUDITSC_SUCCESS)?"yes":"no", | 818 | (context->return_valid==AUDITSC_SUCCESS)?"yes":"no", |
819 | context->return_code); | 819 | context->return_code); |
820 | |||
821 | mutex_lock(&tty_mutex); | ||
820 | if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name) | 822 | if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name) |
821 | tty = tsk->signal->tty->name; | 823 | tty = tsk->signal->tty->name; |
822 | else | 824 | else |
@@ -838,6 +840,9 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts | |||
838 | context->gid, | 840 | context->gid, |
839 | context->euid, context->suid, context->fsuid, | 841 | context->euid, context->suid, context->fsuid, |
840 | context->egid, context->sgid, context->fsgid, tty); | 842 | context->egid, context->sgid, context->fsgid, tty); |
843 | |||
844 | mutex_unlock(&tty_mutex); | ||
845 | |||
841 | audit_log_task_info(ab, tsk); | 846 | audit_log_task_info(ab, tsk); |
842 | if (context->filterkey) { | 847 | if (context->filterkey) { |
843 | audit_log_format(ab, " key="); | 848 | audit_log_format(ab, " key="); |