Re: rmmod e1000 hangs (Was Re: 2.6.22-rc2-mm1)

From: Herbert Xu
Date: Fri May 25 2007 - 08:54:48 EST


On Thu, May 24, 2007 at 07:44:29AM -0700, Kok, Auke wrote:
>
> I get the feeling that a recent change exposed us to this, our lab has been
> seeing similar OOPS's yesterday out of nothing.

Yep you're right. It was the change where we removed the
netif_poll_enable call from e1000_open. The problem is that
e1000_close calls e1000_down which in turn calls netif_poll_disable.
That means the next e1000_open won't reenable polling and the
dev_close (or in fact any call to netif_poll_disable) after that
will hang.

In fact my original premise is completely wrong since netif_poll_enable
can be safely called from dev_open *if* you can guarantee that no polls
have already been scheduled.

This should be the case as long as we keep IRQs disabled before
netif_poll_enable. So the problem is that somehow we're getting
into e1000_open with IRQs enabled on the NIC which then causes a
poll to be scheduled before the call to netif_poll_enable.

So please revert my patch.

We need to find out why we're getting IRQs before calling
e1000_irq_enable in e1000_open.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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/