]> git.baikalelectronics.ru Git - kernel.git/commit
security: use READ_ONCE instead of deprecated ACCESS_ONCE
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 8 Jun 2017 13:47:34 +0000 (14:47 +0100)
committerJames Morris <james.l.morris@oracle.com>
Fri, 9 Jun 2017 03:29:45 +0000 (13:29 +1000)
commitc8a8ccb7b487f37f95d583cfbca858355c2e8825
treec7ec84b6670ee3fc33a23d87668a8644aba60157
parent43b741a3174322234e0e7c17ce41e4a8159152f1
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