[quagga-dev 256] Re: PATCH: suspected "reference leak" in zebra/zerba_rib.c

Paul Jakma paul at clubi.ie
Wed Sep 24 12:42:12 BST 2003

On Wed, 24 Sep 2003, Gilad Arnold wrote:

> Hi Paul,

> Once due to route_node_lookup(), which locks the matching node
> before returning it;

arg yes.. this is exactly why i hate the hidden locking.

> twice because you remove an element (static route, in this case)
> from the node's info structure. The unlock calls I've added refer
> to the latter, then the former, in that order (you could of course
> bunch them up before the return of the function, I figured it's
> more readable this way though). Basically I've just reversed the
> effect of static_add_ipv4().

makes perfect sense.

> Does it make sense to you, or is there anything else you see?

your the zebra_rib.c guru :) - makes perfect sense anyway afaict.

> I don't really agree: this locking may seem too strict from time to
> time, however it does assure you that once you've grabbed a
> reference to some route node, by some call to the table lib, it
> can't be invalidated until you explicitly let go of it. Why would
> you want to do that?

Cause its hidden. See above :)

> (And, how's everything? ;-> I seem to have paused my work on
> recursive multihop for the time being, I'm extremely overloaded
> these days, apologies for that...)

no worries. same for everyone i think. so many things to do.. so 
little time... - same story everywhere.

> Gilad

Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
	warning: do not ever send email to spam at dishone.st
In 1750 Issac Newton became discouraged when he fell up a flight of stairs.

More information about the Quagga-dev mailing list