Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8884
b: refs/heads/master
c: ce625a8
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse committed Jul 18, 2005
1 parent 6e96453 commit 6bcdf74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 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: d5b454f2c40c9efd0cc113bc3220ebcb66b7c022
refs/heads/master: ce625a801664d8ed7344117bbb57510e4e0e872c
4 changes: 3 additions & 1 deletion trunk/kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ unsigned int audit_serial(void)
unsigned int ret;

spin_lock_irqsave(&serial_lock, flags);
ret = serial++;
do {
ret = ++serial;
} while (unlikely(!ret));
spin_unlock_irqrestore(&serial_lock, flags);

return ret;
Expand Down
4 changes: 3 additions & 1 deletion trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ void audit_syscall_entry(struct task_struct *tsk, int arch, int major,
if (likely(state == AUDIT_DISABLED))
return;

context->serial = audit_serial();
context->serial = 0;
context->ctime = CURRENT_TIME;
context->in_syscall = 1;
context->auditable = !!(state == AUDIT_RECORD_CONTEXT);
Expand Down Expand Up @@ -1138,6 +1138,8 @@ void audit_inode(const char *name, const struct inode *inode, unsigned flags)
void auditsc_get_stamp(struct audit_context *ctx,
struct timespec *t, unsigned int *serial)
{
if (!ctx->serial)
ctx->serial = audit_serial();
t->tv_sec = ctx->ctime.tv_sec;
t->tv_nsec = ctx->ctime.tv_nsec;
*serial = ctx->serial;
Expand Down

0 comments on commit 6bcdf74

Please sign in to comment.