]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
rcu: add DEBUG_OBJECTS_RCU_HEAD check for alignment
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 29 Mar 2011 19:56:56 +0000 (12:56 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 6 May 2011 06:16:57 +0000 (23:16 -0700)
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 <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
include/linux/rcupdate.h

index 9e169c2ba91f9008b29ca31435a3127d2df7d508..c7aeacf7fc9846125d33d8af48e7bec5f550adef 100644 (file)
@@ -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,