All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [regression] Latest git has WARN_ON storm with e1000e driver
Date: Fri, 3 Oct 2008 18:25:44 +0200	[thread overview]
Message-ID: <200810031825.44706.borntraeger@de.ibm.com> (raw)
In-Reply-To: <200810031755.55931.borntraeger@de.ibm.com>

This patch seems to fix it. Comments?

kernel_init uses lock_kernel to serialize the initialization. If the driver
is compiled into the kernel, the probe function of e1000e is called under 
this lock and therefore the WARN_ON(preempt_count()) triggers. We can now 
1. remove this WARN_ON
2. check for SYSTEM_RUNNING

This patch implements 2.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 0b6095b..cca9731 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -396,7 +396,7 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
 	u32 extcnf_ctrl;
 	u32 timeout = PHY_CFG_TIMEOUT;
 
-	WARN_ON(preempt_count());
+	WARN_ON(system_state == SYSTEM_RUNNING && preempt_count());
 
 	if (!mutex_trylock(&nvm_mutex)) {
 		WARN(1, KERN_ERR "e1000e mutex contention. Owned by pid %d\n",

  parent reply	other threads:[~2008-10-03 16:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03  8:41 [regression] Latest git has WARN_ON storm with e1000e driver Christian Borntraeger
2008-10-03 14:52 ` Linus Torvalds
2008-10-03 15:20   ` Christian Borntraeger
2008-10-03 15:36     ` Linus Torvalds
2008-10-03 15:50       ` Christian Borntraeger
2008-10-03 15:55       ` Christian Borntraeger
2008-10-03 16:05         ` Linus Torvalds
2008-10-03 16:23           ` Linus Torvalds
2008-10-03 16:25           ` Brandeburg, Jesse
2008-10-03 16:36             ` Linus Torvalds
2008-10-03 19:41           ` Thomas Gleixner
2008-10-03 16:25         ` Christian Borntraeger [this message]
2008-10-03 15:08 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810031825.44706.borntraeger@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=arjan@infradead.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.