diff options
author | Elena Reshetova <elena.reshetova@intel.com> | 2017-03-02 14:23:45 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-05-11 17:35:32 +0300 |
commit | efc0c21c9ea786d6f019d7df7b4e3932f3578d90 (patch) | |
tree | 8d116630c8560d2b1398235a1d501082aa1b88b0 /arch/s390/include/asm/debug.h | |
parent | d04a4c76f71dd5335f8e499b59617382d84e2b8d (diff) | |
download | linux-efc0c21c9ea786d6f019d7df7b4e3932f3578d90.tar.xz |
s390: convert debug_info.ref_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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/debug.h')
-rw-r--r-- | arch/s390/include/asm/debug.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/debug.h b/arch/s390/include/asm/debug.h index 0206c8052328..df7b54ea956d 100644 --- a/arch/s390/include/asm/debug.h +++ b/arch/s390/include/asm/debug.h @@ -10,6 +10,7 @@ #include <linux/spinlock.h> #include <linux/kernel.h> #include <linux/time.h> +#include <linux/refcount.h> #include <uapi/asm/debug.h> #define DEBUG_MAX_LEVEL 6 /* debug levels range from 0 to 6 */ @@ -31,7 +32,7 @@ struct debug_view; typedef struct debug_info { struct debug_info* next; struct debug_info* prev; - atomic_t ref_count; + refcount_t ref_count; spinlock_t lock; int level; int nr_areas; |