Herbert Xu wrote:
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 ?
+ 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,
ok I see now, thanks
Mika
|