Posted Aug 4, 2012 12:49 UTC (Sat) by butlerm (subscriber, #13312)
In reply to: ACCESS_ONCE() by daglwn
Parent article: ACCESS_ONCE()
>It seems to me the bug is in the kernel. Either lock or lock->owner should be volatile-qualified in its declaration.
That problem with that idea is that practically everything in the kernel would have to be declared volatile. That is inefficient when it doesn't matter (because a lock has been acquired), and misleading otherwise. Linus made some comments along these lines: