lkml.org 
[lkml]   [2020]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [tip: locking/core] lockdep: Fix lockdep recursion
    On Thu, Oct 15, 2020 at 11:49:26AM +0200, Peter Zijlstra wrote:
    > --- a/kernel/rcu/tree.c
    > +++ b/kernel/rcu/tree.c
    > @@ -1764,8 +1764,7 @@ static bool rcu_gp_init(void)
    > smp_mb(); // Pair with barriers used when updating ->ofl_seq to odd values.
    > firstseq = READ_ONCE(rnp->ofl_seq);
    > if (firstseq & 0x1)
    > - while (firstseq == smp_load_acquire(&rnp->ofl_seq))
    > - schedule_timeout_idle(1); // Can't wake unless RCU is watching.
    > + smp_cond_load_relaxed(&rnp->ofl_seq, VAL == firstseq);

    My bad, that should be: VAL != firstseq.

    > smp_mb(); // Pair with barriers used when updating ->ofl_seq to even values.
    > raw_spin_lock(&rcu_state.ofl_lock);
    > raw_spin_lock_irq_rcu_node(rnp);

    \
     
     \ /
      Last update: 2020-10-15 11:53    [W:4.117 / U:0.256 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site