]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/mce: Convert threshold_bank.cpus from atomic_t to refcount_t
authorElena Reshetova <elena.reshetova@intel.com>
Fri, 19 May 2017 09:39:13 +0000 (11:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 21 May 2017 19:55:13 +0000 (21:55 +0200)
commit473e90b2e8356f084dcf9c815a5170d4d4925897
tree59e060264aa0a1d6c3cc32a04dba8170bdceca56
parent5f0744e50db1628d6de770b92278445b3de2779f
x86/mce: Convert threshold_bank.cpus from atomic_t to refcount_t

The 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.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Hans Liljestrand <ishkamiel@gmail.com>
Reviewed-by: David Windsor <dwindsor@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1492695536-5947-1-git-send-email-elena.reshetova@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/amd_nb.h
arch/x86/kernel/cpu/mcheck/mce_amd.c