KEYS: Load key expiry time atomically in keyring_search_iterator()
authorEric Biggers <ebiggers@google.com>
Wed, 27 Sep 2017 19:50:45 +0000 (12:50 -0700)
committerDavid Howells <dhowells@redhat.com>
Wed, 18 Oct 2017 08:12:41 +0000 (09:12 +0100)
commit9d6c8711b6a751a694bcfaf49fb557b82092ee46
treedc8b395982b19ceae03b85dbdf34e7388a6828fa
parent1823d475a5eeaa0f52789b1b7e2d31a592ae92ea
KEYS: Load key expiry time atomically in keyring_search_iterator()

Similar to the case for key_validate(), we should load the key ->expiry
once atomically in keyring_search_iterator(), since it can be changed
concurrently with the flags whenever the key semaphore isn't held.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
security/keys/keyring.c