• Peter Zijlstra's avatar
    module: Sanitize RCU usage and locking · 0be964be
    Peter Zijlstra authored
    Currently the RCU usage in module is an inconsistent mess of RCU and
    RCU-sched, this is broken for CONFIG_PREEMPT where synchronize_rcu()
    does not imply synchronize_sched().
    
    Most usage sites use preempt_{dis,en}able() which is RCU-sched, but
    (most of) the modification sites use synchronize_rcu(). With the
    exception of the module bug list, which actually uses RCU.
    
    Convert everything over to RCU-sched.
    
    Furthermore add lockdep asserts to all sites, because it's not at all
    clear to me the required locking is observed, esp. on exported
    functions.
    
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Acked-by: default avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    0be964be
bug.c 4.96 KB