From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:37194 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753867AbeCFQ6z (ORCPT ); Tue, 6 Mar 2018 11:58:55 -0500 Received: by mail-pl0-f65.google.com with SMTP id w12-v6so461208plp.4 for ; Tue, 06 Mar 2018 08:58:55 -0800 (PST) Message-ID: <1520355533.109662.24.camel@gmail.com> Subject: Re: [PATCH RESEND net-next] net: Do synchronize_rcu() in ip6mr_sk_done() only if this is needed From: Eric Dumazet To: Kirill Tkhai , davem@davemloft.net, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org Cc: Yuval Mintz Date: Tue, 06 Mar 2018 08:58:53 -0800 In-Reply-To: <1520355021.109662.22.camel@gmail.com> References: <152035343583.28894.2225634076957704200.stgit@localhost.localdomain> <1520355021.109662.22.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2018-03-06 at 08:50 -0800, Eric Dumazet wrote: > > But... what is this synchronize_rcu() doing exactly ? > > This was added in 8571ab479a6e1ef46ead5ebee567e128a422767c > > ("ip6mr: Make mroute_sk rcu-based") > > Typically on a delete, the synchronize_rcu() would be needed before > freeing the deleted object. > > But nowadays we have better way : SOCK_RCU_FREE To be clear, your patch is fine Kirill, I am only sad seeing one can add a synchronize_rcu() in hot path without anyone complaining during code review. Reviewed-by: Eric Dumazet