Re: MOD_INC_USE_COUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Nov 2005 21:14:29 +0800
Tony <[email protected]> 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 [email protected]
> 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 <[email protected]>
OSDL http://developer.osdl.org/~shemminger
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux