]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
security, keys: convert key.usage from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Fri, 31 Mar 2017 12:20:48 +0000 (15:20 +0300)
committerJames Morris <james.l.morris@oracle.com>
Mon, 3 Apr 2017 00:49:05 +0000 (10:49 +1000)
commitfff292914d3a2f1efd05ca71c2ba72a3c663201e
tree627f9870ad82da8f6f06cca86a73e3b7e2fc97d5
parent8291798dcf059cdc5e55a59b2c4ad70ae14508c2
security, keys: convert key.usage from atomic_t to refcount_t

refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
include/linux/key.h
security/keys/gc.c
security/keys/key.c
security/keys/keyring.c
security/keys/proc.c
security/keys/request_key_auth.c