From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: MOD_INC_USE_COUNT
Date: Tue, 15 Nov 2005 10:52:57 -0800 [thread overview]
Message-ID: <20051115105257.6a272cdf@localhost.localdomain> (raw)
In-Reply-To: 437347B5.6080201@gmail.com
On Thu, 10 Nov 2005 21:14:29 +0800
Tony <tony.uestc@gmail.com> wrote:
> Hello All,
> Usually, when a net_device->open is called, it will MOD_INC_USE_COUNT on
> success. It is removed since 2.5.x, then should I increase the use
> count? how? thx.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
Did you read Documentation/network/netdevices.txt?
Networking devices don't do ref counting because they should be removable
at any time! Because of hotplug and failover, it just doesn't work to keep
track of ref counting network devices.
What happens is that each protocol is notified on module removal of a
network device. The protocol then cleans up all references to that
device. If the protocol is buggy, then you will see the kernel
wait and print a message that ref count is still not correct.
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
prev parent reply other threads:[~2005-11-15 18:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-10 13:14 MOD_INC_USE_COUNT Tony
2005-11-10 14:03 ` MOD_INC_USE_COUNT linux-os (Dick Johnson)
2005-11-10 14:21 ` MOD_INC_USE_COUNT Tony
2005-11-10 15:28 ` MOD_INC_USE_COUNT linux-os (Dick Johnson)
2005-11-13 10:29 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-15 3:56 ` MOD_INC_USE_COUNT Tony
2005-11-15 15:34 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-16 7:39 ` MOD_INC_USE_COUNT Tony
2005-11-16 13:24 ` MOD_INC_USE_COUNT Ralf Baechle
2005-11-15 18:52 ` Stephen Hemminger [this message]
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=20051115105257.6a272cdf@localhost.localdomain \
--to=shemminger@osdl.org \
--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