From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit Date: Tue, 14 Nov 2017 11:07:47 -0800 Message-ID: <1510686467.2849.176.camel@edumazet-glaptop3.roam.corp.google.com> References: <151066759055.14465.9783879083192000862.stgit@localhost.localdomain> <20171114101129.351d8aed@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Kirill Tkhai , davem@davemloft.net, vyasevic@redhat.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, vyasevich@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, adobriyan@gmail.com, fw@strlen.de, nicolas.dichtel@6wind.com, xiyou.wangcong@gmail.com, roman.kapl@sysgo.com, paul@paul-moore.com, dsahern@gmail.com, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, rshearma@brocade.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ebiederm@xmission.com, avagin@virtuozzo.com, gorcunov@virtuozzo.com To: Stephen Hemminger Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:48508 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752510AbdKNTHu (ORCPT ); Tue, 14 Nov 2017 14:07:50 -0500 In-Reply-To: <20171114101129.351d8aed@xeon-e3> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 2017-11-14 at 10:11 -0800, Stephen Hemminger wrote: > On Tue, 14 Nov 2017 16:53:33 +0300 > Kirill Tkhai wrote: > > > + /* > > + * RCU-protected list, modifiable by pernet-init and -exit methods. > > + * When net namespace is alive (net::count > 0), all the changes > > + * are made under rw_sem held on write. > > + */ > > + struct list_head fib_notifier_ops; > > > > If you use __rcu annotation then it could be checked (and the comment is not needed). I do not think we can use __rcu annotation yet on a struct list_head ? (The annotation would be needed on the members)