From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754002AbcGLRVi (ORCPT ); Tue, 12 Jul 2016 13:21:38 -0400 Received: from www.linutronix.de ([62.245.132.108]:35355 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbcGLRVh (ORCPT ); Tue, 12 Jul 2016 13:21:37 -0400 Date: Tue, 12 Jul 2016 19:19:19 +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 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: > On Wed, 13 Jul 2016, kernel test robot wrote: > > [ 1.863354] WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:80 debug_mutex_unlock+0x20c/0x2b3 > > [ 1.877193] DEBUG_LOCKS_WARN_ON(lock->owner != current) > > > > [ 1.979431] [] mutex_unlock+0x9/0xb > > [ 1.979431] [] mutex_unlock+0x9/0xb > > [ 1.990691] [] cpuhp_store_callbacks+0x5a/0x63 > > I have a hard time to figure out how that can happen: > > static void cpuhp_store_callbacks(enum cpuhp_state state, > const char *name, > int (*startup)(unsigned int cpu), > int (*teardown)(unsigned int cpu)) > { > /* (Un)Install the callbacks for further cpu hotplug operations */ > struct cpuhp_step *sp; > > mutex_lock(&cpuhp_state_mutex); > sp = cpuhp_get_step(state); > sp->startup = startup; > sp->teardown = teardown; > sp->name = name; > mutex_unlock(&cpuhp_state_mutex); > } > > Confused .... And printing cpuhp_state_mutex.owner does not reduce the confusion level. [ 0.186490] WTF 1 (null) > mutex_lock(&cpuhp_state_mutex); [ 0.186848] WTF 2 ffff8800002a4000 > sp = cpuhp_get_step(state); [ 0.187174] WTF 3 ffff8800002a4000 and current is: [ 0.205749] CPU: 0 PID: 1 Comm: swapper [ 0.207410] task: ffff8800002a4000 /me goes digging deeper