Re: [PATCH 1/2] libsas: remove irq save in sas_ata_qc_issue()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-05-30 12:16:23 [+0100], John Garry wrote:
> On 30/05/2018 11:16, Sebastian Andrzej Siewior wrote:
> > On 2018-05-30 10:34:12 [+0100], John Garry wrote:
> > > Sorry, but personally I don't see much value in this change. I think it's
> > > better for safety to be consistent in how we lock & unlock the spinlock,
> > > i.e. use irqsave variant (or similar).
> > 
> > The lock should do irqsave() and unlock irqrestore(). This
> > local_irqsave() + unlock() is not correct.
> > 
> 
> Aren't they the same, i.e. local_irq_save()+spin_lock() =
> spin_lock_irqsave()? Both give state of lock held, interrupts and preemption
> disabled.

Yes, there are the same on vanilla and not on RT. However my point is
that the code does this instead:
	local_irq_save();
	spin_unlock();

and this is wrong. There is no spin_unlock_irqsave().

> 
> John
> 
Sebastian



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux