]> asedeno.scripts.mit.edu Git - linux.git/commit
kernel: convert cgroup_namespace.count from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 20 Feb 2017 10:19:00 +0000 (12:19 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 6 Mar 2017 19:55:22 +0000 (14:55 -0500)
commit387ad9674b0013c8756ad20d854ff005b0c313ad
tree4e019a943d277232afdd5421276cc48829008214
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201
kernel: convert cgroup_namespace.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: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c
kernel/cgroup/namespace.c