From: YOSHIFUJI Hideaki Date: Mon, 28 Aug 2006 20:19:30 +0000 (-0700) Subject: [IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup(). X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=33cc48966827165e49de1cb8ff4fb57c127d4be0;p=deliverable%2Flinux.git [IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup(). In ip6_pol_route_lookup(), when we finish backtracking at the top-level root entry, we need to hold it. Bug noticed by Mitsuru Chinen . Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 75f4bb9611ce..d6b4b4f48d18 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -510,8 +510,8 @@ restart: rt = fn->leaf; rt = rt6_device_match(rt, fl->oif, flags); BACKTRACK(&fl->fl6_src); - dst_hold(&rt->u.dst); out: + dst_hold(&rt->u.dst); read_unlock_bh(&table->tb6_lock); rt->u.dst.lastuse = jiffies;