diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-06 01:05:50 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-09 02:27:41 -0500 |
commit | 48887e63d6e057543067327da6b091297f7fe645 (patch) | |
tree | f290af5a887bcf840a63043eb2df3a4c02ccaea3 /kernel/audit.c | |
parent | 7f0ed77d241b60f70136f15b8eef30a3de1fa249 (diff) | |
download | lwn-48887e63d6e057543067327da6b091297f7fe645.tar.gz lwn-48887e63d6e057543067327da6b091297f7fe645.zip |
[PATCH] fix broken timestamps in AVC generated by kernel threads
Timestamp in audit_context is valid only if ->in_syscall is set.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r-- | kernel/audit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index d8646c23b427..ce6d8ea3131e 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1121,9 +1121,7 @@ unsigned int audit_serial(void) static inline void audit_get_stamp(struct audit_context *ctx, struct timespec *t, unsigned int *serial) { - if (ctx) - auditsc_get_stamp(ctx, t, serial); - else { + if (!ctx || !auditsc_get_stamp(ctx, t, serial)) { *t = CURRENT_TIME; *serial = audit_serial(); } |