On Thu, Dec 15, 2011 at 09:26:46AM +0800, Jack Wang wrote: > > 2018 mb();/*in order to force CPU ordering*/ > > 2019 spin_unlock_irqrestore(&pm8001_ha->lock, > > flags); > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Calling irqrestore before we've done an irqsave. What are we trying to > > restore? > [Jack Wang] > We hold spin_lock_irqsave when we process interrupt, so here we need restore > it to do task done clean. You're not restoring a previous saved state, flags is set to zero here. You're calling: spin_unlock_irqrestore(&pm8001_ha->lock, 0); The whole function is badly broken. mpi_sata_event() has similar problems. With spin_lock_irqsave() and spin_unlock_irqrestore() you first have to save the state to "flags" before you can restore it. Doing it the other way round doesn't make any sort sense. regards, dan carpenter
Attachment:
signature.asc
Description: Digital signature