• Frederic Weisbecker's avatar
    rcu: Improve synchronize_rcu() diagnostics · 18fec7d8
    Frederic Weisbecker authored
    Although TREE_PREEMPT_RCU indirectly uses might_sleep() to detect illegal
    use of synchronize_sched() and synchronize_rcu_bh() from within an RCU
    read-side critical section, this might_sleep() check is bypassed when
    there is only a single CPU (for example, when running an SMP kernel on
    a single-CPU system).  This patch therefore adds a might_sleep() call
    to the rcu_blocking_is_gp() check that is unconditionally invoked from
    both synchronize_sched() and synchronize_rcu_bh().
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
rcutree.h 2.79 KB