]> git.baikalelectronics.ru Git - kernel.git/commit
KEYS: load key flags and expiry time atomically in proc_keys_show()
authorEric Biggers <ebiggers@google.com>
Wed, 27 Sep 2017 19:50:46 +0000 (12:50 -0700)
committerDavid Howells <dhowells@redhat.com>
Wed, 18 Oct 2017 08:12:41 +0000 (09:12 +0100)
commitc0cc10b0ccd57d8d68d2058b31084d37c7e51c41
tree4ba32c1aad16a4bf1573a2f6b15d749b04a5eb42
parent025a32ae65571b1173193c7232e772e59dcf602d
KEYS: load key flags and expiry time atomically in proc_keys_show()

In proc_keys_show(), the key semaphore is not held, so the key ->flags
and ->expiry can be changed concurrently.  We therefore should read them
atomically just once.

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