• Paul E. McKenney's avatar
    rcu-tasks: Avoid raw-spinlocked wakeups from call_rcu_tasks_generic() · 3063b33a
    Paul E. McKenney authored
    
    
    If the caller of of call_rcu_tasks(), call_rcu_tasks_rude(),
    or call_rcu_tasks_trace() holds a raw spinlock, and then if
    call_rcu_tasks_generic() determines that the grace-period kthread must
    be awakened, then the wakeup might acquire a normal spinlock while a
    raw spinlock is held.  This results in lockdep splats when the
    kernel is built with CONFIG_PROVE_RAW_LOCK_NESTING=y.
    
    This commit therefore defers the wakeup using irq_work_queue().
    
    It would be nice to directly invoke wakeup when a raw spinlock is not
    held, but there is currently no way to check for this in all kernels.
    Reported-by: default avatarMartin Lau <kafai@fb.com>
    Cc: Neeraj Upadhyay <neeraj.iitr10@gmail.com>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    3063b33a
tasks.h 55.7 KB