From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756598AbZAGQvP (ORCPT ); Wed, 7 Jan 2009 11:51:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752793AbZAGQu6 (ORCPT ); Wed, 7 Jan 2009 11:50:58 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:44963 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbZAGQu4 (ORCPT ); Wed, 7 Jan 2009 11:50:56 -0500 Date: Wed, 7 Jan 2009 08:50:34 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Alexey Zaytsev cc: LKML , Ingo Molnar , Nick Piggin Subject: Re: linux-next: Tree for December 11 In-Reply-To: Message-ID: References: <20081211200459.14d18d7a.sfr@canb.auug.org.au> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Jan 2009, Alexey Zaytsev wrote: > > Almost a month later, the warning is still there, and now also in Linus' git. > Am I the only one who sees it? Possibly. But that may be because most people don't have DEBUG_PREEMPT. > [ 0.004150] WARNING: at kernel/sched.c:4435 sub_preempt_count+0xae/0xc0() > [ 0.004247] Hardware name: HP Compaq nx7300 (GB848ES#ACB) > [ 0.004342] Modules linked in: > [ 0.004477] Pid: 0, comm: swapper Not tainted 2.6.28-06859-gede6f5a #179 > [ 0.004575] Call Trace: > [ 0.004672] [] warn_slowpath+0x86/0xa0 > [ 0.004770] [] ? tick_check_oneshot_change+0x4b/0x100 > [ 0.004868] [] ? _spin_unlock_irq+0x10/0x30 > [ 0.004963] [] sub_preempt_count+0xae/0xc0 > [ 0.005060] [] _local_bh_enable+0x27/0xa0 Hmm. _local_bh_enable() would make the preempt_count go negative or fall below 1 (with kernel lock held). > [ 0.005155] [] __do_softirq+0xf7/0x150 > [ 0.005250] [] ? __do_softirq+0x0/0x150 > [ 0.005345] [] ? tick_nohz_update_jiffies+0xe/0x50 > [ 0.005488] [] ? irq_exit+0x7f/0x90 > [ 0.005584] [] ? do_IRQ+0xa3/0x120 > [ 0.005678] [] ? common_interrupt+0x27/0x2c > [ 0.005773] [] ? try_acquire_console_sem+0x1b/0x30 > [ 0.005872] [] ? check_bugs+0xb8/0xe0 > [ 0.005967] [] ? start_kernel+0x25a/0x2f0 .. and it happens early on, when we take an interrupt in check_bugs. Are we ready to enable interrupts there? Maybe the page fault we took (on purpose) enabled interrupts and we now take the irq much too early. Or maybe the initial kernel lock didn't set preempt_count to 1. Ingo, any ideas? Linus