netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@dev.6wind.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] netns: remove useless synchronize_net()
Date: Fri, 06 Feb 2009 14:50:53 +0100	[thread overview]
Message-ID: <498C403D.9040500@dev.6wind.com> (raw)
In-Reply-To: <20090205.234520.149982266.davem@davemloft.net>

Le 06.02.2009 08:45, David Miller a écrit :
> From: Nicolas Dichtel <nicolas.dichtel@dev.6wind.com>
> Date: Thu, 05 Feb 2009 11:21:22 +0100
> 
>> In dev_change_net_namespace(), synchronize_net() is called at the
>> end of the function, but there is no reason (no deletion occurs).
>>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> 
> It is necessary to make sure all cpus stop looking at the
> previous namespace the device was attached to, and only
> see the new mapping.
I didn't really understand why it is 'necessary'.
If namespace is destroyed after this function, then cleanup_net() will ensure 
that nobody is looking at it
There is only two callers, rtnetlink and default_device_exit().


Thank you for your answer,
Nicolas

> 
> That's why this function has two synchronize_net() calls.

  reply	other threads:[~2009-02-06 13:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05 10:21 [PATCH] netns: remove useless synchronize_net() Nicolas Dichtel
2009-02-06  7:45 ` David Miller
2009-02-06 13:50   ` Nicolas Dichtel [this message]
2009-02-06 22:10     ` David Miller
2009-02-10 15:40       ` Nicolas Dichtel
2009-02-10 16:40         ` Daniel Lezcano
2009-02-10 16:48           ` Nicolas Dichtel
2009-02-10 17:13             ` Daniel Lezcano
2009-02-11  7:51               ` Eric W. Biederman
2009-02-11 15:49                 ` Daniel Lezcano
2009-02-11 23:03                   ` Eric W. Biederman
2009-02-12 15:11                     ` Daniel Lezcano
     [not found]                       ` <49943C17.5080509-GANU6spQydw@public.gmane.org>
2009-02-15 16:13                         ` Daniel Lezcano
     [not found]                           ` <49983F0D.2090905-GANU6spQydw@public.gmane.org>
2009-02-16 13:46                             ` Nicolas Dichtel

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=498C403D.9040500@dev.6wind.com \
    --to=nicolas.dichtel@dev.6wind.com \
    --cc=davem@davemloft.net \
    --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;
as well as URLs for NNTP newsgroup(s).