Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> writes: > rwsems can be used with IRQs disabled, particularily in early boot > before IRQs are enabled. Currently the spin_unlock_irq() usage in the > slow-path will unconditionally enable interrupts and cause problems > early in boot where interrupts are not yet initialized or enabled. > > This patch uses save/restore versions of IRQ spinlocks in the slowpath > to ensure interrupts are not unintentionally enabled in the case where > the rwsem is used with IRQs disabled. > > Idea for this fix suggested by H. Peter Anvin. > > Tested on TI OMAP3-based platform (ARM Cortex-A8) > > Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> > Cc: Rabin Vincent <rabin@xxxxxx> > Cc: H. Peter Anvin <hpa@xxxxxxxxx> > LKML-Reference: <alpine.LFD.2.00.1004010904540.3707@xxxxxxxxxxxxxxxxxxxxxxx> > Reviewed-by: WANG Cong <xiyou.wangcong@xxxxxxxxx> For the benefit of the l-o archives... This patch was merged into mainline in .34-rc6 and fixes potential deadlocks on boot, seen especially when using the SLUB allocator. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html