Skip to content

Commit

Permalink
[IPV6] ROUTE: Fix dst reference counting in ip6_pol_route_lookup().
Browse files Browse the repository at this point in the history
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 <CHINEN@jp.ibm.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Sep 22, 2006
1 parent 5176f91 commit 33cc489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ static struct rt6_info *ip6_pol_route_lookup(struct fib6_table *table,
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;
Expand Down

0 comments on commit 33cc489

Please sign in to comment.