Prev: [PATCH 2/4] futex: add futex_q static initializer
Next: mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage
From: KAMEZAWA Hiroyuki on 6 May 2010 02:30 On Wed, 5 May 2010 14:21:48 +0300 Phil Carmody <ext-phil.2.carmody(a)nokia.com> wrote: > From: Phil Carmody <ext-phil.2.carmody(a)nokia.com> > > The bottom 4 hunks are atomically changing memory to which there > are no aliases as it's freshly allocated, so there's no need to > use atomic operations. > > The other hunks are just atomic_read and atomic_set, and do not > involve any read-modify-write. The use of atomic_{read,set} > doesn't prevent a read/write or write/write race, so if a race > were possible (I'm not saying one is), then it would still be > there even with atomic_set. > > See: > http://digitalvampire.org/blog/index.php/2007/05/13/atomic-cargo-cults/ > > Signed-off-by: Phil Carmody <ext-phil.2.carmody(a)nokia.com> > Acked-by: Kirill A. Shutemov <kirill(a)shutemov.name> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |