From: Paul E. McKenney Date: Tue, 29 Mar 2011 19:56:56 +0000 (-0700) Subject: rcu: add DEBUG_OBJECTS_RCU_HEAD check for alignment X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b0c9d7ff2793502650ad987c3f237d5fe5587a1e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git rcu: add DEBUG_OBJECTS_RCU_HEAD check for alignment Verify that rcu_head structures are aligned to a four-byte boundary. This check is enabled by CONFIG_DEBUG_OBJECTS_RCU_HEAD. Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 9e169c2ba91..c7aeacf7fc9 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -785,6 +785,7 @@ extern struct debug_obj_descr rcuhead_debug_descr; static inline void debug_rcu_head_queue(struct rcu_head *head) { + WARN_ON_ONCE((unsigned long)head & 0x3); debug_object_activate(head, &rcuhead_debug_descr); debug_object_active_state(head, &rcuhead_debug_descr, STATE_RCU_HEAD_READY,