]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/audit.c
[PATCH] fix broken timestamps in AVC generated by kernel threads
[linux-2.6-omap-h63xx.git] / kernel / audit.c
index d8646c23b427ecd122a73894f6f72535bfd01585..ce6d8ea3131e78136b3b50803c424c0fffbeb20a 100644 (file)
@@ -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();
        }