From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 14/18] ipv6: Take table lock outside of sernum update function Date: Sun, 7 Jan 2018 10:05:39 -0700 Message-ID: <38cc7eec-48c4-d81c-a9de-e2799a197684@gmail.com> References: <20180107104518.31693-1-idosch@mellanox.com> <20180107104518.31693-15-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, roopa@cumulusnetworks.com, nicolas.dichtel@6wind.com, weiwan@google.com, kafai@fb.com, yoshfuji@linux-ipv6.org, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:35326 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754072AbeAGRFl (ORCPT ); Sun, 7 Jan 2018 12:05:41 -0500 Received: by mail-pf0-f193.google.com with SMTP id t12so1473732pfg.2 for ; Sun, 07 Jan 2018 09:05:41 -0800 (PST) In-Reply-To: <20180107104518.31693-15-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/7/18 3:45 AM, Ido Schimmel wrote: > The next patch is going to allow dead routes to remain in the FIB tree > in certain situations. > > When this happens we need to be sure to bump the sernum of the nodes > where these are stored so that potential copies cached in sockets are > invalidated. > > The function that performs this update assumes the table lock is not > taken when it is invoked, but that will not be the case when it is > invoked by the tree walker. > > Have the function assume the lock is taken and make the single caller > take the lock itself. > > Signed-off-by: Ido Schimmel > --- > net/ipv6/ip6_fib.c | 5 +---- > net/ipv6/route.c | 2 ++ > 2 files changed, 3 insertions(+), 4 deletions(-) > Acked-by: David Ahern