slqb: don't enable interrupts during early boot
Sebastian discovered that SLQB can enable interrupts early in boot due to taking the rwsem. It should not be contended here, so XADD algorithm implementations should not be affected, however spinlock algorithm implementations do a spin_lock_irq in down_write fastpath and would be affected. Move the lock out of early init path, comment why. This also covers a very small (and basically insignificant) race where kmem_cache_create_ok checks succeed but kmem_cache_create still creates a duplicate named cache because the lock was dropped and retaken. Reported-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Showing
Please register or sign in to comment