aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index c95173a194bf..ce8c957201ef 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -701,7 +701,24 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk,
701 if (likely(!context)) 701 if (likely(!context))
702 return NULL; 702 return NULL;
703 context->return_valid = return_valid; 703 context->return_valid = return_valid;
704 context->return_code = return_code; 704
705 /*
706 * we need to fix up the return code in the audit logs if the actual
707 * return codes are later going to be fixed up by the arch specific
708 * signal handlers
709 *
710 * This is actually a test for:
711 * (rc == ERESTARTSYS ) || (rc == ERESTARTNOINTR) ||
712 * (rc == ERESTARTNOHAND) || (rc == ERESTART_RESTARTBLOCK)
713 *
714 * but is faster than a bunch of ||
715 */
716 if (unlikely(return_code <= -ERESTARTSYS) &&
717 (return_code >= -ERESTART_RESTARTBLOCK) &&
718 (return_code != -ENOIOCTLCMD))
719 context->return_code = -EINTR;
720 else
721 context->return_code = return_code;
705 722
706 if (context->in_syscall && !context->dummy && !context->auditable) { 723 if (context->in_syscall && !context->dummy && !context->auditable) {
707 enum audit_state state; 724 enum audit_state state;