LWN.net Logo

ACCESS_ONCE()

ACCESS_ONCE()

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:

http://lwn.net/Articles/233482/


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds