Skip to contentSkip to conversation

Patch "x86/mce/AMD: Make the init code more robust" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Aug 4, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 4.9-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-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Fri Aug 4 13:32:40 PDT 2017

From: Thomas Gleixner <[email protected]>
Date: Mon, 26 Dec 2016 22:58:20 +0100
Subject: x86/mce/AMD: Make the init code more robust

From: Thomas Gleixner <[email protected]>

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

---
 arch/x86/kernel/cpu/mcheck/mce_amd.c |    3 +++
 1 file changed, 3 insertions(+)
arch/x86/kernel/cpu/mcheck/mce_amd.c +3 -0
@@ -955,6 +955,9 @@ static int threshold_create_bank(unsigne
 	const char *name = get_name(bank, NULL);
 	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 [email protected] are

queue-4.9/smp-hotplug-move-unparking-of-percpu-threads-to-the-control-cpu.patch queue-4.9/smp-hotplug-replace-bug_on-and-react-useful.patch queue-4.9/sched-cgroup-move-sched_online_group-back-into-css_online-to-fix-crash.patch queue-4.9/x86-mce-amd-make-the-init-code-more-robust.patch