]> asedeno.scripts.mit.edu Git - linux.git/commit
kvm: convert kvm.users_count from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 20 Feb 2017 11:06:21 +0000 (13:06 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 1 Mar 2017 16:03:21 +0000 (17:03 +0100)
commite3736c3eb3a6f7c0966923b629c9f92b558aa9c7
tree850c343552afe4d498411ba1e767aff4b43f0163
parentbba82fd75694832b59433bf4e9d7ede8de1dfd42
kvm: convert kvm.users_count 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>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
include/linux/kvm_host.h
virt/kvm/kvm_main.c