OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] netns: Simplify the network namespace list locking rules.
Re: [PATCH] netns: Simplify the network namespace list locking rules. [message #20868 is a reply to message #20860] Thu, 27 September 2007 05:40 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Wed, 26 Sep 2007 21:54:47 -0600

> 
> Denis V. Lunev <den@sw.ru> noticed that the locking rules
> for the network namespace list are over complicated and broken.
> 
> In particular the current register_netdev_notifier currently
> does not take any lock making the for_each_net iteration racy
> with network namespace creation and destruction. Oops.
> 
> The fact that we need to use for_each_net in rtnl_unlock() when
> the rtnetlink support becomes per network namespace makes designing
> the proper locking tricky.  In addition we need to be able to call
> rtnl_lock() and rtnl_unlock() when we have the net_mutex held.
> 
> After thinking about it and looking at the alternatives carefully
> it looks like the simplest and most maintainable solution is
> to remove net_list_mutex altogether, and to use the rtnl_mutex instead.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Applied, thanks Eric.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Previous Topic: [PATCH] net: Fix running without sysfs
Next Topic: [patch 0/3][netns] fix and wipeout timewait sockets
Goto Forum:
  


Current Time: Thu Oct 09 16:41:11 GMT 2025

Total time taken to generate the page: 0.13525 seconds