Skip to contentSkip to conversation

Patch "perf/x86/intel/uncore: Fix wrong box pointer check" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
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

perf/x86/intel/uncore: Fix wrong box pointer check

to the 4.11-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:
perf-x86-intel-uncore-fix-wrong-box-pointer-check.patch
and it can be found in the queue-4.11 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 80c65fdb4c6920e332a9781a3de5877594b07522 Mon Sep 17 00:00:00 2001

From: Kan Liang <[email protected]>
Date: Thu, 29 Jun 2017 12:09:26 -0700
Subject: perf/x86/intel/uncore: Fix wrong box pointer check

From: Kan Liang <[email protected]>

commit 80c65fdb4c6920e332a9781a3de5877594b07522 upstream.

Should not init a NULL box. It will cause system crash. The issue looks like caused by a typo.

This was not noticed because there is no NULL box. Also, for most boxes, they are enabled by default. The init code is not critical.

Fixes fff4b87e594a ("perf/x86/intel/uncore: Make package handling more robust")
---
 arch/x86/events/intel/uncore.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/uncore.c +1 -1
@@ -1170,7 +1170,7 @@ static int uncore_event_cpu_online(unsig
 		pmu = type->pmus;
 		for (i = 0; i < type->num_boxes; i++, pmu++) {
 			box = pmu->boxes[pkg];
-			if (!box && atomic_inc_return(&box->refcnt) == 1)
+			if (box && atomic_inc_return(&box->refcnt) == 1)
 				uncore_box_init(box);
 		}
 	}

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/perf-x86-intel-uncore-fix-wrong-box-pointer-check.patch