David S. Miller wrote:
From: Ben Greear <[EMAIL PROTECTED]>
Date: Fri, 02 Sep 2005 13:53:58 -0700
I'm trying to write some code to walk all of the places where
routes might exist and find any that reference a particular
net-device.
Man, good luck. The IPSEC destination cache entries live in
chains only obtainable from the IPSEC database. And when
routes are flushed, sometimes they only exist hung off of
sockets via sk->sk_dst, so you'll need to walk every single
socket in the system as well. There are also dst entries
on the garbage collection list, which you'll need to scan
as well.
So, routing cache, IPSEC database, sockets, DST garbage
list... sounds big and complicated, a sign that you're
attacking the problem the wrong way.
It is better to implement this via backpointers in the
debugging information, perhaps.
Ouch. So, I know the line of code that grabs the reference that leaks,
and I know the address of the neighbor structure that is holding
the pointer to the net-device. Is there anything I can deduce from
the neighbor structure as to where it is in the system? I'll go
ahead and add a way to print out this structure and paste to the
list in case someone notices something.
One thing, I'm not using IPSEC, so at least I should be able to
ignore that code...
Thanks,
Ben
--
Ben Greear <[EMAIL PROTECTED]>
Candela Technologies Inc http://www.candelatech.com
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html