From: Thomas Gleixner <tglx@linutronix.de>
To: kernel test robot <xiaolong.ye@intel.com>
Cc: lkp@01.org, tipbuild@zytor.com,
LKML <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
Vince Weaver <vincent.weaver@maine.edu>,
Stephane Eranian <eranian@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Kan Liang <kan.liang@intel.com>, Jiri Olsa <jolsa@redhat.com>,
Borislav Petkov <bp@suse.de>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Adam Borowski <kilobyte@angband.pl>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Anna-Maria Gleixner <anna-maria@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3
Date: Tue, 12 Jul 2016 21:59:23 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1607122144560.4083@nanos> (raw)
In-Reply-To: <alpine.DEB.2.11.1607121916430.4083@nanos>
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
};
next prev parent reply other threads:[~2016-07-12 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <57851c63.jJgXfR29tgQSoJ3w%xiaolong.ye@intel.com>
2016-07-12 16:41 ` Thomas Gleixner
2016-07-12 17:19 ` Thomas Gleixner
2016-07-12 19:59 ` Thomas Gleixner [this message]
2016-07-13 8:02 ` [tip:core/urgent] cpu/hotplug: Keep enough storage space if SMP=n to avoid array out of bounds scribble tip-bot for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.11.1607122144560.4083@nanos \
--to=tglx@linutronix.de \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=bp@suse.de \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=kilobyte@angband.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tipbuild@zytor.com \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
--cc=xiaolong.ye@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®