Re: [PATCH net-next 11/16] ipv6: replace dst_hold() with dst_hold_safe() in routing code

2017-10-06 Thread David Miller
From: 吉藤英明 Date: Sat, 7 Oct 2017 08:57:49 +0900 > Hi, > > 2017-10-07 4:06 GMT+09:00 Wei Wang : >> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >> index 941c062389d2..aeb349aea429 100644 >> --- a/net/ipv6/route.c >> +++ b/net/ipv6/route.c > : >> @@ -1625,12 +1643,17 @@ struct rt6_info *ip6_po

Re: [PATCH net-next 11/16] ipv6: replace dst_hold() with dst_hold_safe() in routing code

2017-10-06 Thread Wei Wang
On Fri, Oct 6, 2017 at 4:57 PM, 吉藤英明 wrote: > Hi, > > 2017-10-07 4:06 GMT+09:00 Wei Wang : >> diff --git a/net/ipv6/route.c b/net/ipv6/route.c >> index 941c062389d2..aeb349aea429 100644 >> --- a/net/ipv6/route.c >> +++ b/net/ipv6/route.c > : >> @@ -1625,12 +1643,17 @@ struct rt6_info *ip6_pol_rout

Re: [PATCH net-next 11/16] ipv6: replace dst_hold() with dst_hold_safe() in routing code

2017-10-06 Thread 吉藤英明
Hi, 2017-10-07 4:06 GMT+09:00 Wei Wang : > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index 941c062389d2..aeb349aea429 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c : > @@ -1625,12 +1643,17 @@ struct rt6_info *ip6_pol_route(struct net *net, > struct fib6_table *table, >

[PATCH net-next 11/16] ipv6: replace dst_hold() with dst_hold_safe() in routing code

2017-10-06 Thread Wei Wang
From: Wei Wang With rwlock, it is safe to call dst_hold() in the read thread because read thread is guaranteed to be separated from write thread. However, after we replace rwlock with rcu, it is no longer safe to use dst_hold(). A dst might already have been deleted but is waiting for the rcu gra