summaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 27ffcf3..d321e25 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -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;
OpenPOWER on IntegriCloud