Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441700

Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3
Date 2016-07-12 22:10 +0200
Message-ID <rUcae-1jn-23@gated-at.bofh.it> (permalink)
References <rU92F-7wG-7@gated-at.bofh.it> <rU92F-7wG-5@gated-at.bofh.it> <rU9Fo-80P-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 12 Jul 2016, Thomas Gleixner wrote:
> /me goes digging deeper

and dons a brown paperbag....

8<----------------

Subject: cpuhotplug: Keep enough storage space if SMP=n
From: Thomas Gleixner <tglx@linutronix.de>

The cpuhp_bp_states array is cut short when CONFIG_SMP=n, but the dynamically
registered callbacks are stored nevertheless and happily scribble outside of
the array bounds.

We need to store them in case that the state is unregistered so we can invoke
the teardown function. That's independent of CONFIG_SMP. Make sure the array
is large enough.

Fixes: cff7d378d3fd "cpu/hotplug: Convert to a state machine for the control processor"
Reported-by: kernel test robot <xiaolong.ye@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
diff --git a/kernel/cpu.c b/kernel/cpu.c
index d948e44c471e..7b61887f7ccd 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1201,6 +1201,8 @@ static struct cpuhp_step cpuhp_bp_states[] = {
 		.teardown		= takedown_cpu,
 		.cant_stop		= true,
 	},
+#else
+	[CPUHP_BRINGUP_CPU] = { },
 #endif
 };
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at  kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3 Thomas Gleixner <tglx@linutronix.de> - 2016-07-12 18:50 +0200
  Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at  kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3 Thomas Gleixner <tglx@linutronix.de> - 2016-07-12 19:30 +0200
    Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at  kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3 Thomas Gleixner <tglx@linutronix.de> - 2016-07-12 22:10 +0200
      [tip:core/urgent] cpu/hotplug: Keep enough storage space if SMP=n  to avoid array out of bounds scribble tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-07-13 10:10 +0200

csiph-web