lkml.org 
[lkml]   [2007]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: network driver usage count
Date
David Miller <davem@davemloft.net> writes:

> From: Wagner Ferenc <wferi@niif.hu>
> Date: Wed, 21 Nov 2007 23:16:59 +0100
>
>> Hmm, that would warrant nuking all the reference counts on every
>> driver.
>
> That's not true. When packets are in flight, references go
> to the device and the device cannot be unloaded until those
> references get dropped.

I'm trying to understand it. Do you mean that the "usage count" in
the lsmod output does not express the user's view of a piece of *ware
being in use, but rather the number of internal kernel references to
it, which would become invalid should that piece disappear? Where the
former "invalidily" means some undetectable and uncorrectable
inconsistency in the kernel data structures, which leads to a kernel
crash.

> This behavior makes sense because otherwise you have to figure
> out the myriad of references (each ipv4 address, each ipv6
> address, routes, ARP entries, etc.) just to perform such a
> simple operation.

Yes, that's the user's idea of a network device being in use. It can
get hairy indeed.

> If you do not mean to unload the device, simply do not do it.

Now I know...
--
Thanks for taking the time,
Feri.
-
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/

\
 
 \ /
  Last update: 2007-11-23 11:13    [from the cache]
©2003-2011 Jasper Spaans