Re: [regression] Latest git has WARN_ON storm with e1000e driver

From: Christian Borntraeger
Date: Fri Oct 03 2008 - 12:27:24 EST


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@xxxxxxxxxx>

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",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/