From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755342AbaAIRfN (ORCPT ); Thu, 9 Jan 2014 12:35:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8155 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbaAIRfH (ORCPT ); Thu, 9 Jan 2014 12:35:07 -0500 Date: Thu, 9 Jan 2014 12:33:26 -0500 From: Dave Jones To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Steven Rostedt , Oleg Nesterov , Paul McKenney , Linus Torvalds Subject: Re: [RFC][PATCH] lockdep: Introduce wait-type checks Message-ID: <20140109173326.GA10105@redhat.com> Mail-Followup-To: Dave Jones , Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Steven Rostedt , Oleg Nesterov , Paul McKenney , Linus Torvalds References: <20140109111516.GE7572@laptop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140109111516.GE7572@laptop.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 09, 2014 at 12:15:16PM +0100, Peter Zijlstra wrote: > Subject: lockdep: Introduce wait-type checks > From: Peter Zijlstra > Date: Tue, 19 Nov 2013 21:45:48 +0100 > > This patch extends lockdep to validate lock wait-type context. ooh, a new toy. *boom* [ 0.298629] ============================= [ 0.298732] [ BUG: Invalid wait context ] [ 0.298834] 3.13.0-rc7+ #15 Not tainted [ 0.298935] ----------------------------- [ 0.299038] swapper/0/1 is trying to lock: [ 0.299135] (&n->list_lock){......}-{3:3}, at: [] get_partial_node.isra.49+0x4d/0x228 [ 0.299453] stack backtrace: [ 0.299608] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-rc7+ #15 [ 0.299983] 0000000000000001 ffff880243f37a00 ffffffff816dfe5b 0000000000000014 [ 0.300302] ffff880243f37a78 ffffffff8109f1f7 0000000000000000 ffff880243f37a78 [ 0.300611] 0000000000000046 ffffffff81189ae3 ffffffff00000000 0000000000000046 [ 0.300927] Call Trace: [ 0.301028] [] dump_stack+0x4e/0x7a [ 0.301128] [] __lock_acquire.isra.28+0x3d7/0xd80 [ 0.301238] [] ? deactivate_slab+0x3c3/0x740 [ 0.301345] [] lock_acquire+0x8d/0x120 [ 0.302971] [] ? get_partial_node.isra.49+0x4d/0x228 [ 0.303077] [] _raw_spin_lock+0x3b/0x50 [ 0.303183] [] ? get_partial_node.isra.49+0x4d/0x228 [ 0.303290] [] get_partial_node.isra.49+0x4d/0x228 [ 0.303397] [] ? __module_text_address+0x12/0x60 [ 0.303502] [] ? is_module_text_address+0x2f/0x50 [ 0.303610] [] ? __kernel_text_address+0x58/0x80 [ 0.303717] [] __slab_alloc+0x1cd/0x562 [ 0.303821] [] ? alloc_cpumask_var_node+0x1f/0x90 [ 0.303929] [] kmem_cache_alloc_node_trace+0xda/0x290 [ 0.304037] [] ? alloc_cpumask_var_node+0x1f/0x90 [ 0.304145] [] alloc_cpumask_var_node+0x1f/0x90 [ 0.304250] [] alloc_cpumask_var+0xe/0x10 [ 0.304357] [] __assign_irq_vector+0x40/0x340 [ 0.304462] [] __create_irqs+0x151/0x210 [ 0.304567] [] create_irq+0x22/0x30 [ 0.304674] [] dmar_set_interrupt+0x2d/0xd0 [ 0.304784] [] enable_drhd_fault_handling+0x24/0x66 [ 0.304890] [] irq_remap_enable_fault_handling+0x26/0x30 [ 0.304999] [] bsp_end_local_APIC_setup+0x18/0x1a [ 0.305106] [] native_smp_prepare_cpus+0x35c/0x3d3 [ 0.305215] [] kernel_init_freeable+0x124/0x26c [ 0.305321] [] ? kernel_init+0xe/0x130 [ 0.305427] [] ? rest_init+0xd0/0xd0 [ 0.305529] [] kernel_init+0xe/0x130 [ 0.305627] [] ret_from_fork+0x7c/0xb0 [ 0.305731] [] ? rest_init+0xd0/0xd0 [ 0.305836] other info that might help us debug this: [ 0.305993] 1 lock held by swapper/0/1: [ 0.306093] #0: (vector_lock){......}-{2:2}, at: [] __create_irqs+0x10c/0x210 [ 0.306444] stack backtrace: [ 0.306599] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-rc7+ #15 [ 0.306972] 0000000000000001 ffff880243f37a00 ffffffff816dfe5b 0000000000000014 [ 0.307282] ffff880243f37a78 ffffffff8109f220 0000000000000000 ffff880243f37a78 [ 0.307594] 0000000000000046 ffffffff81189ae3 ffffffff00000000 0000000000000046 [ 0.307903] Call Trace: [ 0.307999] [] dump_stack+0x4e/0x7a [ 0.308103] [] __lock_acquire.isra.28+0x400/0xd80 [ 0.308209] [] ? deactivate_slab+0x3c3/0x740 [ 0.308316] [] lock_acquire+0x8d/0x120 [ 0.308422] [] ? get_partial_node.isra.49+0x4d/0x228 [ 0.308529] [] _raw_spin_lock+0x3b/0x50 [ 0.308631] [] ? get_partial_node.isra.49+0x4d/0x228 [ 0.308735] [] get_partial_node.isra.49+0x4d/0x228 [ 0.308843] [] ? __module_text_address+0x12/0x60 [ 0.308949] [] ? is_module_text_address+0x2f/0x50 [ 0.309055] [] ? __kernel_text_address+0x58/0x80 [ 0.309161] [] __slab_alloc+0x1cd/0x562 [ 0.309265] [] ? alloc_cpumask_var_node+0x1f/0x90 [ 0.309372] [] kmem_cache_alloc_node_trace+0xda/0x290 [ 0.309479] [] ? alloc_cpumask_var_node+0x1f/0x90 [ 0.309586] [] alloc_cpumask_var_node+0x1f/0x90 [ 0.309692] [] alloc_cpumask_var+0xe/0x10 [ 0.309799] [] __assign_irq_vector+0x40/0x340 [ 0.309906] [] __create_irqs+0x151/0x210 [ 0.310005] [] create_irq+0x22/0x30 [ 0.310109] [] dmar_set_interrupt+0x2d/0xd0 [ 0.310215] [] enable_drhd_fault_handling+0x24/0x66 [ 0.310321] [] irq_remap_enable_fault_handling+0x26/0x30 [ 0.310429] [] bsp_end_local_APIC_setup+0x18/0x1a [ 0.310536] [] native_smp_prepare_cpus+0x35c/0x3d3 [ 0.310644] [] kernel_init_freeable+0x124/0x26c [ 0.310746] [] ? kernel_init+0xe/0x130 [ 0.310852] [] ? rest_init+0xd0/0xd0 [ 0.310955] [] kernel_init+0xe/0x130 [ 0.311058] [] ret_from_fork+0x7c/0xb0 [ 0.311164] [] ? rest_init+0xd0/0xd0 nitpick: Why is the backtrace printed twice ? Dave