netdev
[Top] [All Lists]

Re: [PATCH] Bugs in xfrm

To: Krishna Kumar <krkumar@xxxxxxxxxx>
Subject: Re: [PATCH] Bugs in xfrm
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Fri, 9 Jan 2004 20:48:08 -0800
Cc: netdev@xxxxxxxxxxx, krkumar@xxxxxxxxxx, kumarkr@xxxxxxxxxx
In-reply-to: <Pine.LNX.4.44.0401091339170.10121-100000@linux-udp14999547uds>
References: <20031108223049.36651f8d.davem@xxxxxxxxxx> <Pine.LNX.4.44.0401091339170.10121-100000@linux-udp14999547uds>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 9 Jan 2004 17:40:03 -0800 (PST)
Krishna Kumar <krkumar@xxxxxxxxxx> wrote:

> These changes compile cleanly, but I couldn't test since these are
> corner cases. Please let me know if this can be applied. I am sending
> as one patch file for now instead of multiple files as they all small.

Maybe you should actually try to test these changes before I think
about applying them, for example:

> +void dst_bundle_free(struct dst_entry *dst)
> +{
> +     struct dst_entry *next;
> +
> +     while (dst) {
> +             next = dst->child;
> +             dst_free(dst);
> +     }
> +}

Explain to me how that won't loop forever if given a non-NULL dst?

Next, this dst_bundle_free() thing is totally not needed as far as I can
tell.  When dst_free() is made, the top-level of the bundle's dst gets added
to the garbage collection list, the garbage collection properly walks the
children to process the whole bundle.

Please redo this patch and please test it this time :)

<Prev in Thread] Current Thread [Next in Thread>