Very nice you do not touch struct rcu_head.
Mathieu Desnoyers wrote:
I'm a little foolish. I don't know why we need
STATE_RCU_HEAD_READY/QUEUED.
1) obj->astate does not be set to STATE_RCU_HEAD_READY in
debug_object_activate/init().
Maybe you need to add a function:
debug_object_activate_with_astate(head, descr, init_astate);
(the same as debug_object_activate(), but init obj->astate also)
Or you need:
@debugobjects.h
# define DEBUG_OBJECT_ASTATE_INIT 0
@rcupdate.c
# define STATE_RCU_HEAD_READY DEBUG_OBJECT_ASTATE_INIT
# define STATE_RCU_HEAD_QUEUED (STATE_RCU_HEAD_READY + 1)
2) In debug_rcu_head_queue(), debug_object_active_state()
is always success when debug_object_activate() is success.
In debug_rcu_head_unqueue(), debug_object_active_state()
is always success if RCU subsystem is running correctly.
(Correct me if I'm wrong) So we don't need debug_object_active_state()
here if we just find racy users of call_rcu().
preempt_count() != 0 ??? What happen when !CONFIG_PREEMPT?
We may need call rcu_barrier(), rcu_barrier_sched(), rcu_barrier_bh() together?
rcu_barrier() does not ensure to flush callbacks of RCU_BH, RCU_SCHED.
--