[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de758bfa-4c20-9d40-58d8-c5ae07b40ff3@gmail.com>
Date: Mon, 3 Jun 2019 12:37:48 -0600
From: David Ahern <dsahern@...il.com>
To: Wei Wang <weiwan@...gle.com>, David Ahern <dsahern@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
idosch@...lanox.com, saeedm@...lanox.com,
Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH v2 net-next 4/7] ipv6: Plumb support for nexthop object in
a fib6_info
On 6/3/19 12:09 PM, Wei Wang wrote:
>> @@ -667,6 +704,13 @@ static void __remove_nexthop_fib(struct net *net, struct nexthop *nh)
>> }
>> if (do_flush)
>> fib_flush(net);
>> +
>> + /* ip6_del_rt removes the entry from this list hence the _safe */
>> + list_for_each_entry_safe(f6i, tmp, &nh->f6i_list, nh_list) {
>> + /* __ip6_del_rt does a release, so do a hold here */
>> + fib6_info_hold(f6i);
> Do we need fib6_info_hold_safe() here?
>
I do not think so.
If it is on the f6i_list, then fib6_purge_rt has not been called.
fib6_purge_rt and this function are both called with rtnl held, so there
is no race with the removal from the list.
Powered by blists - more mailing lists