Subject: Re: [PATCH] Bugs in xfrm

From: "David S. Miller" <[email-masked]>
Date: Fri, 9 Jan 2004 20:48:08 -0800

On Fri, 9 Jan 2004 17:40:03 -0800 (PST)
Krishna Kumar <[email-masked]> 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 :)