Thread (114 messages) 114 messages, 9 authors, 2005-04-22

Re: [3/4] [IPSEC] Add route element to xfrm_dst

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-02-15 09:53:46

On Tue, Feb 15, 2005 at 10:10:06AM +0200, Mika Penttil? wrote:
Shouldn't this pinning happen inside the loop for eaxh xdst, to be 
balanced with  the dst_release(xdst->route) in xfrm_dst_destroy ?
quoted
+	dst_hold(&rt->u.dst);

for (i = 0; i < nx; i++) {
	struct dst_entry *dst1 = dst_alloc(&xfrm4_dst_ops);
+		struct xfrm_dst *xdst;

	if (unlikely(dst1 == NULL)) {
		err = -ENOBUFS;
There is a dst_release here.

The reference is either released here if the allocation fails, or it
is held by dst1 which is either returned or freed as part of the bundle.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help