]> git.baikalelectronics.ru Git - kernel.git/commit
security, keys: convert key_user.usage from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Fri, 31 Mar 2017 12:20:49 +0000 (15:20 +0300)
committerJames Morris <james.l.morris@oracle.com>
Mon, 3 Apr 2017 00:49:06 +0000 (10:49 +1000)
commit6a0cf49b3f11df5a697687f2ebb3edb855f33e65
tree9fecb40084bb937fafa04eaf57d9bc4ae3bcb6a9
parentda8b00211b4b82a2180b4d576ac4bb3683edb228
security, keys: convert key_user.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>
security/keys/internal.h
security/keys/key.c
security/keys/proc.c
security/keys/process_keys.c