Skip to content
  • Vlastimil Babka's avatar
    mm, slub: make slab_lock() disable irqs with PREEMPT_RT · b0de7aee
    Vlastimil Babka authored
    
    
    We need to disable irqs around slab_lock() (a bit spinlock) to make it
    irq-safe. The calls to slab_lock() are nested under spin_lock_irqsave() which
    doesn't disable irqs on PREEMPT_RT, so add explicit disabling with PREEMPT_RT.
    
    We also distinguish cmpxchg_double_slab() where we do the disabling explicitly
    and __cmpxchg_double_slab() for contexts with already disabled irqs.  However
    these context are also typically spin_lock_irqsave() thus insufficient on
    PREEMPT_RT. Thus, change __cmpxchg_double_slab() to be same as
    cmpxchg_double_slab() on PREEMPT_RT.
    
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    b0de7aee