Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967AbYJCQhm (ORCPT ); Fri, 3 Oct 2008 12:37:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752627AbYJCQhe (ORCPT ); Fri, 3 Oct 2008 12:37:34 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:57826 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752564AbYJCQhe (ORCPT ); Fri, 3 Oct 2008 12:37:34 -0400 Date: Fri, 3 Oct 2008 09:36:28 -0700 (PDT) From: Linus Torvalds To: "Brandeburg, Jesse" cc: Christian Borntraeger , Thomas Gleixner , Linux Kernel Mailing List , Arjan van de Ven Subject: RE: [regression] Latest git has WARN_ON storm with e1000e driver In-Reply-To: <36D9DB17C6DE9E40B059440DB8D95F520655F9A0@orsmsx418.amr.corp.intel.com> Message-ID: References: <200810031041.49350.borntraeger@de.ibm.com> <200810031720.53923.borntraeger@de.ibm.com> <200810031755.55931.borntraeger@de.ibm.com> <36D9DB17C6DE9E40B059440DB8D95F520655F9A0@orsmsx418.amr.corp.intel.com> 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 Content-Length: 919 Lines: 26 On Fri, 3 Oct 2008, Brandeburg, Jesse wrote: > > Linus Torvalds wrote: > > So this whole bug is actually because that debug test is just > > _broken_. It shouldn't be WARN_ON(preempt_count()), it should be > > 'might_sleep()', which does it right. > > > > The right thing to check is "in_atomic() || irqs_disabled()". > > okay, do you want me to post a patch? I think Thomas is probably > offline due to fridaynightitis. Change the code to:? > > WARN_ON(in_atomic() || irqs_disabled); No, literally just "might_sleep()". It then does everything right, including taking into account that we allow certain behavior during bootup that we don't allow later. Linus -- 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/