提交 33cc4896 编写于 作者: Y YOSHIFUJI Hideaki 提交者: 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: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5176f91e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册