security: use READ_ONCE instead of deprecated ACCESS_ONCE
commit381f20fceba8ea540aef5241a9099f4552700d0c
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 8 Jun 2017 13:47:34 +0000 (8 14:47 +0100)
committerJames Morris <james.l.morris@oracle.com>
Fri, 9 Jun 2017 03:29:45 +0000 (9 13:29 +1000)
treec7ec84b6670ee3fc33a23d87668a8644aba60157
parent47b2c3fff4932e6fc17ce13d51a43c6969714e20
security: use READ_ONCE instead of deprecated ACCESS_ONCE

With the new standardized functions, we can replace all ACCESS_ONCE()
calls across relevant security/keyrings/.

ACCESS_ONCE() does not work reliably on non-scalar types. For example
gcc 4.6 and 4.7 might remove the volatile tag for such accesses during
the SRA (scalar replacement of aggregates) step:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145

Update the new calls regardless of if it is a scalar type, this is
cleaner than having three alternatives.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/keys/keyring.c