Commit 33cc4896 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller

[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 <CHINEN@jp.ibm.com>.
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5176f91e
...@@ -510,8 +510,8 @@ static struct rt6_info *ip6_pol_route_lookup(struct fib6_table *table, ...@@ -510,8 +510,8 @@ static struct rt6_info *ip6_pol_route_lookup(struct fib6_table *table,
rt = fn->leaf; rt = fn->leaf;
rt = rt6_device_match(rt, fl->oif, flags); rt = rt6_device_match(rt, fl->oif, flags);
BACKTRACK(&fl->fl6_src); BACKTRACK(&fl->fl6_src);
dst_hold(&rt->u.dst);
out: out:
dst_hold(&rt->u.dst);
read_unlock_bh(&table->tb6_lock); read_unlock_bh(&table->tb6_lock);
rt->u.dst.lastuse = jiffies; rt->u.dst.lastuse = jiffies;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment