Subject: Re: [PATCH] netns: remove useless synchronize_net()

From: Nicolas Dichtel <[email-masked]>
Date: Fri, 06 Feb 2009 14:50:53 +0100

Le 06.02.2009 08:45, David Miller a écrit :
> From: Nicolas Dichtel <[email-masked]>
> 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 <[email-masked]>
> 
> 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.