diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index 91e0bf31f6ce13..0bc1313c49e2d6 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -73,8 +73,8 @@ static inline void rcu_seq_start(unsigned long *sp) static inline void rcu_seq_end(unsigned long *sp) { smp_mb(); /* Ensure update-side operation before counter increment. */ + WARN_ON_ONCE(!(*sp & 0x1)); WRITE_ONCE(*sp, *sp + 1); - WARN_ON_ONCE(*sp & 0x1); } /* Take a snapshot of the update side's sequence number. */