* Patch "x86/mce/AMD: Make the init code more robust" has been added to the 3.18-stable tree
@ 2017-08-04 21:36 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-04 21:36 UTC (permalink / raw)
To: tglx, alexander.levin, boris.ostrovsky, gregkh, markus, torvalds
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
x86/mce/AMD: Make the init code more robust
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-mce-amd-make-the-init-code-more-robust.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Fri Aug 4 13:41:01 PDT 2017
From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 26 Dec 2016 22:58:20 +0100
Subject: x86/mce/AMD: Make the init code more robust
From: Thomas Gleixner <tglx@linutronix.de>
[ Upstream commit 0dad3a3014a0b9e72521ff44f17e0054f43dcdea ]
If mce_device_init() fails then the mce device pointer is NULL and the
AMD mce code happily dereferences it.
Add a sanity check.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/cpu/mcheck/mce_amd.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -573,6 +573,9 @@ static int threshold_create_bank(unsigne
const char *name = th_names[bank];
int err = 0;
+ if (!dev)
+ return -ENODEV;
+
if (is_shared_bank(bank)) {
nb = node_to_amd_nb(amd_get_nb_id(cpu));
Patches currently in stable-queue which might be from tglx@linutronix.de are
queue-3.18/x86-mce-amd-make-the-init-code-more-robust.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-04 21:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 21:36 Patch "x86/mce/AMD: Make the init code more robust" has been added to the 3.18-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).