Re: possible scsi driver bugs with atomic_set/atomic_read and missing barrier

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

 



On Tue, Mar 10, 2009 at 10:25:44PM -0500, Mike Christie wrote:
> atomic_set(&hba->state, SOME_STATE_VALUE);
> 
> in a interrupt or thread or tasklet then in another thread they will do
> 
> if (atomic_read(&hba->state) == SOME_STATE_VALUE))
> 
> Does this mean that the drivers should be doing a
> 
> atomic_set(&hba->state, SOME_STATE_VALUE);
> smp_mb();

Possibly "smp_mb__after_atomic_inc()" might be correct.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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