Commit 33cc48966827165e49de1cb8ff4fb57c127d4be0

Authored by YOSHIFUJI Hideaki
Committed by David S. Miller
1 parent 5176f91ea8

[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: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -510,8 +510,8 @@
510 510 rt = fn->leaf;
511 511 rt = rt6_device_match(rt, fl->oif, flags);
512 512 BACKTRACK(&fl->fl6_src);
513   - dst_hold(&rt->u.dst);
514 513 out:
  514 + dst_hold(&rt->u.dst);
515 515 read_unlock_bh(&table->tb6_lock);
516 516  
517 517 rt->u.dst.lastuse = jiffies;