Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755633AbYBUV0Q (ORCPT ); Thu, 21 Feb 2008 16:26:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753566AbYBUV0B (ORCPT ); Thu, 21 Feb 2008 16:26:01 -0500 Received: from mx1.redhat.com ([66.187.233.31]:47076 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbYBUVZ7 (ORCPT ); Thu, 21 Feb 2008 16:25:59 -0500 Message-ID: <47BDEA82.8050508@redhat.com> Date: Thu, 21 Feb 2008 18:17:54 -0300 From: Glauber Costa User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Ingo Molnar CC: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, glommer@gmail.com, pzijlstr@redhat.com, arjan@infradead.org, Peter Zijlstra Subject: Re: [PATCH 0/2] onlining cpus can break lockdep References: <1203626456-3101-1-git-send-email-gcosta@redhat.com> <20080221211209.GB9031@elte.hu> In-Reply-To: <20080221211209.GB9031@elte.hu> Content-Type: multipart/mixed; boundary="------------040503060709050806010806" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2665 Lines: 74 This is a multi-part message in MIME format. --------------040503060709050806010806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ingo Molnar wrote: > * Glauber Costa wrote: > >> Hi, >> >> While testing with hotplugging cpus today, I've came across a stack >> trace generated by lockdep. The reason for that is that do_boot_cpu() >> in smpboot_64.c ends up initializing a struct work_struct variable in >> the stack. > > hm, could you post that trace? Sure. To make it clearer where the problem is, I also added the attached patch to my testing. Trace is: (note the call to do_fork_idle) INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. key: ffff81003bdf9d18, name: c_idle.work Pid: 11, comm: events/1 Not tainted 2.6.25-rc2 #129 Call Trace: [] static_obj+0x5d/0x74 [] __lock_acquire+0x8b5/0xc3e [] run_workqueue+0x84/0x1df [] lock_acquire+0x91/0xbc [] run_workqueue+0x95/0x1df [] do_fork_idle+0x0/0x20 [] run_workqueue+0xd9/0x1df [] worker_thread+0x90/0x9b [] autoremove_wake_function+0x0/0x2e [] worker_thread+0x0/0x9b [] kthread+0x47/0x73 [] trace_hardirqs_on_thunk+0x35/0x3a [] child_rip+0xa/0x12 [] restore_args+0x0/0x34 [] kthreadd+0x14a/0x16f [] kthreadd+0x14a/0x16f [] kthread+0x0/0x73 [] child_rip+0x0/0x12 --------------040503060709050806010806 Content-Type: text/x-patch; name="lockdep.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lockdep.patch" diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 3574379..572df7d 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -730,6 +730,7 @@ register_lock_class(struct lockdep_map * printk("INFO: trying to register non-static key.\n"); printk("the code is fine but needs lockdep annotation.\n"); printk("turning off the locking correctness validator.\n"); + printk("key: %p, name: %s\n", lock->key, lock->name); dump_stack(); return NULL; --------------040503060709050806010806-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/