Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82026
b: refs/heads/master
c: f701b75
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Feb 1, 2008
1 parent e86f313 commit 6e4e7a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfef93a5d1fb5654fe2025276c55e202d10b5255
refs/heads/master: f701b75ed5ffb6820efe530d1a3abcc6fc4678ad
19 changes: 18 additions & 1 deletion trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,24 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk,
if (likely(!context))
return NULL;
context->return_valid = return_valid;
context->return_code = return_code;

/*
* we need to fix up the return code in the audit logs if the actual
* return codes are later going to be fixed up by the arch specific
* signal handlers
*
* This is actually a test for:
* (rc == ERESTARTSYS ) || (rc == ERESTARTNOINTR) ||
* (rc == ERESTARTNOHAND) || (rc == ERESTART_RESTARTBLOCK)
*
* but is faster than a bunch of ||
*/
if (unlikely(return_code <= -ERESTARTSYS) &&
(return_code >= -ERESTART_RESTARTBLOCK) &&
(return_code != -ENOIOCTLCMD))
context->return_code = -EINTR;
else
context->return_code = return_code;

if (context->in_syscall && !context->dummy && !context->auditable) {
enum audit_state state;
Expand Down

0 comments on commit 6e4e7a6

Please sign in to comment.