mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, linux-kernel@vger.kernel.org
Cc: 0x7f454c46@gmail.com, "David S. Miller" <davem@davemloft.net>,
	Florian Westphal <fw@strlen.de>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] rtnetlink: Synchronze net in rtnl_unregister()
Date: Tue, 26 Feb 2019 00:09:11 +0000	[thread overview]
Message-ID: <fe1912d1-a047-8a23-bc66-b49c894a8ee9@arista.com> (raw)
In-Reply-To: <5079b888-a62f-991a-6f0b-1248d23d0045@gmail.com>

On 2/25/19 11:31 PM, Eric Dumazet wrote:
> On 02/25/2019 03:21 PM, Dmitry Safonov wrote:
>> Well, sure - but it seems confusing that rtnl_unregister() will require
>> synchronize_rcu(), while rtnl_unregister_all() will not.
> 
> rtnl_unregister_all() is a different beast, since it removes the whole rtnl_msg_handlers[protocol]
> 
> rtnl_unregister() only removes a subset, with different usages.
> 
>> And I thought no one would care about another synchronize_rcu() in exit
>> path.
> 
> We definitely care about things be done properly.
> 
> If synchronize_rcu() is needed there, be it, but kfree_rcu() seems to be fine.
> 
> In any case, I believe you need to more carefully explain what is the problem here,
> because I could not really see it.

Ugh, sorry - it seems that I haven't had enough coffee today.

I've read again rtnetlink_rcv_msg(), who is the only user of
rtnl_msg_handlers[] under read_lock, and it calls try_module_get(owner).

Sorry for the noise,
          Dmitry

      reply	other threads:[~2019-02-26  0:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 21:27 Dmitry Safonov
2019-02-25 23:09 ` Eric Dumazet
2019-02-25 23:21   ` Dmitry Safonov
2019-02-25 23:27     ` Dmitry Safonov
2019-02-25 23:31     ` Eric Dumazet
2019-02-26  0:09       ` Dmitry Safonov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe1912d1-a047-8a23-bc66-b49c894a8ee9@arista.com \
    --to=dima@arista.com \
    --cc=0x7f454c46@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fw@strlen.de \
    --cc=hannes@stressinduktion.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®