From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751771AbcGLUBw (ORCPT ); Tue, 12 Jul 2016 16:01:52 -0400 Received: from www.linutronix.de ([62.245.132.108]:35846 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbcGLUBv (ORCPT ); Tue, 12 Jul 2016 16:01:51 -0400 Date: Tue, 12 Jul 2016 21:59:23 +0200 (CEST) From: Thomas Gleixner To: kernel test robot cc: lkp@01.org, tipbuild@zytor.com, LKML , "H. Peter Anvin" , LKML , Vince Weaver , Stephane Eranian , Peter Zijlstra , Linus Torvalds , Kan Liang , Jiri Olsa , Borislav Petkov , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , Alexander Shishkin , Adam Borowski , Sebastian Andrzej Siewior , Anna-Maria Gleixner , Ingo Molnar Subject: Re: [perf/x86] 8de4a00661: WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3 In-Reply-To: Message-ID: References: <57851c63.jJgXfR29tgQSoJ3w%xiaolong.ye@intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Cc: stable@vger.kernel.org Signed-off-by: Thomas Gleixner --- 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 };