mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: fedor@karpelevitch.net, abz@frogfoot.net, linux-kernel@vger.kernel.org
Subject: Re: possibly bug in 8139cp? (WAS Re: BUG: 2.4.23-pre3 + ifconfig)
Date: Mon, 8 Sep 2003 13:32:20 -0700	[thread overview]
Message-ID: <20030908133220.66676107.akpm@osdl.org> (raw)
In-Reply-To: <20030908172641.GB21226@gtf.org>

Jeff Garzik <jgarzik@pobox.com> wrote:
>
> On Mon, Sep 08, 2003 at 09:43:25AM -0700, Fedor Karpelevitch wrote:
> > > > > I just installed 2.4.23-pre3 on one of our servers. If I
> > > > > up/down the loopback device multiple times ifconfig hangs on
> > > > > the second down (as in unkillable) and afterwards ifconfig
> > > > > stops functioning and I can't reboot the machine, etc.
> 
> This sounds like the NAPI bug we're chasing.
> 

Well it's the same as the bug which was recently added to 2.6:

- dev_close() used to do

	test_bit(__LINK_STATE_RX_SCHED, &dev->state);

- the netif_poll_disable() in tg3.c used to do

	test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);

- someone copied the tg3 netif_poll_disable() into netdevice.h and then
  used it in dev_close(), thus changing and presumably breaking
  dev_close().


I haven't tested this yet, but it'll probably fix things for all NICs and
it might break tg3.  In which case it's a net win ;)


diff -puN include/linux/netdevice.h~ifdown-lockup-fix include/linux/netdevice.h
--- 25/include/linux/netdevice.h~ifdown-lockup-fix	Mon Sep  8 13:20:28 2003
+++ 25-akpm/include/linux/netdevice.h	Mon Sep  8 13:20:34 2003
@@ -854,7 +854,7 @@ static inline void netif_rx_complete(str
 
 static inline void netif_poll_disable(struct net_device *dev)
 {
-	while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
+	while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
 		/* No hurry. */
 		current->state = TASK_INTERRUPTIBLE;
 		schedule_timeout(1);

_


  reply	other threads:[~2003-09-08 20:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-04 18:05 BUG: 2.4.23-pre3 + ifconfig Abraham van der Merwe
     [not found] ` <200309071217.03470.fedor@karpelevitch.net>
2003-09-07 19:15   ` Abraham van der Merwe
     [not found]     ` <200309080943.26254.fedor@karpelevitch.net>
2003-09-08 16:46       ` possibly bug in 8139cp? (WAS Re: BUG: 2.4.23-pre3 + ifconfig) Abraham van der Merwe
2003-09-08 17:26       ` Jeff Garzik
2003-09-08 20:32         ` Andrew Morton [this message]
2003-09-08 23:59           ` Jeff Garzik
2003-09-09  0:09             ` Andrew Morton
2003-09-09  0:41               ` Jeff Garzik

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=20030908133220.66676107.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=abz@frogfoot.net \
    --cc=fedor@karpelevitch.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®