From: Thomas Hood <jdthoodREMOVETHIS@yahoo.co.uk>
To: linux-kernel@vger.kernel.org
Cc: acme@conectiva.com.br
Subject: [BUG] "unregister_netdevice: waiting for eth0 to become free. Usage count = 2"
Date: Thu, 19 Jul 2001 22:48:11 -0400 [thread overview]
Message-ID: <3B579BEB.B5D68FCC@yahoo.co.uk> (raw)
In-Reply-To: <20010214092251.D1144@e-trend.de> <3A8AA725.7446DEA0@ubishops.ca> <20010214165758.L28359@e-trend.de> <20010214122244.H7859@conectiva.com.br>
>Groan< The "unregister_netdevice" bug is back.
I haven't been able to do extensive testing, but I have
just encountered the message
unregister_netdevice: waiting for eth0 to become free. Usage count = 2
again. Once it starts, it repeats ad infinitum, once per second.
The message starts spewing when I do a "cardctl eject"
on a Xircom CEM56 modem/ethernet card (driven by xirc2ps_cs.o, serial.o)
which was previously configured using DHCP with IPX enabled. The cardctl
eject never completes and the OS will not shut down completely; it hangs
at the point where it tries to de-configure network interfaces. Disabling
IPX cured the problem for me the next time I tried.
I am running 2.4.6-ac2, but the bug could have been reintroduced
a while back. I haven't been using Ethernet for a couple of
months.
Well, I'm no expert on the networking code, so I'll just suggest
some things that look odd to me. I'm looking in net/ipx/af_ipx.c,
tracing through ipxitf_create(). This function exits with dev->refcnt
incremented ... unless something goes wrong, in which case the function
exits through via a goto to "out_dev" which decrements the refcnt again.
Likewise, ipxitf_auto_create() increments the dev refcnt (by doing a
dev_hold(dev)) if all goes well. However when I look at ipxitf_delete(),
which I presume ought to undo what the *_create() functions do, I see
nothing that decrements the refcnt.
If this is where the bug lies then I would suggest that the functions
be documented to say that "this function exits with the refcnt incremented
if blah blah blah", etc.
As an aside, I notice that __dev_get_by_name() is called from ipxitf_delete().
A comment preceding __dev_get_by_name() in net/core/dev.c says that this
function should be called "under RTNL semaphore or @dev_base_lock", but
it is actually called under the ipx_interfaces_lock. Is this okay?
__dev_get_by_name() is also called from within ipxitf_ioctl(), seemingly
under no locks at all. Also okay?
Thomas Hood
next prev parent reply other threads:[~2001-07-20 2:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010214092251.D1144@e-trend.de>
[not found] ` <3A8AA725.7446DEA0@ubishops.ca>
[not found] ` <20010214165758.L28359@e-trend.de>
[not found] ` <20010214122244.H7859@conectiva.com.br>
2001-02-15 21:13 ` [PATCH] to deal with bad dev->refcnt in unregister_netdevice() Thomas Hood
2001-02-19 15:27 ` [PATCH] fix bad dev->refcnt in unregister_netdevice was " Arnaldo Carvalho de Melo
2001-02-21 16:22 ` Thomas Hood
2001-02-25 23:42 ` Should isa-pnp utilize the PnP BIOS? Thomas Hood
2001-02-25 23:49 ` Jeremy Jackson
2001-02-26 0:24 ` Jonathan Morton
2001-03-03 0:33 ` Thomas Hood
2001-07-20 2:48 ` Thomas Hood [this message]
2001-07-28 5:44 ` Multiple apm resume events Thomas Hood
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=3B579BEB.B5D68FCC@yahoo.co.uk \
--to=jdthoodremovethis@yahoo.co.uk \
--cc=acme@conectiva.com.br \
--cc=jdthood_A@T_yahoo.co.uk \
--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 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.