On Wed, Jul 27, 2011 at 1:55 PM, Arnd Bergmann <a...@arndb.de> wrote:
> On Wednesday 27 July 2011, Will Newton wrote:
>> The generic atomic bitops currently explicitly cast away the
>> volatile from the pointer passed to them. This will allow the
>> access to the bitfield to happen outside of the critical section
>> thus making the bitops no longer interrupt-safe. Remove this cast
>> and add a volatile keyword to make sure all accesses to the
>> bitfield happen inside the critical section.
>>
>> Signed-off-by: Will Newton <will.new...@imgtec.com>
>
> Have you observed this behavior? The interrupt disable/enable should
> always come with a barrier that should prevent the bitops from
> leaking out, so I don't see how this causes problems in practice.

Yes, although my arch does not have these barriers. Now I see from
memory-barriers.txt that lock/unlock are required to implement a
compiler barrier, sorry for the noise!

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to