OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] [NETNS45] network namespace locking rules
Re: [PATCH] [NETNS45] network namespace locking rules [message #20966 is a reply to message #20954] Fri, 28 September 2007 16:54 Go to previous messageGo to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
"Denis V. Lunev" <den@openvz.org> writes:

> Current locking for network namespace list/initialization is broken.
> for_each_net is called under single rtnl_lock in
> register_netdevice_notifier.

As of  984e617a3e1974022b8f671427a76ffbe886f75b this issue has
been addressed in net-2.6.24

The only remaining part to address is rtnl_unlock().

My current hypothesis is that rtnl_unlock() only needs to process
the packets that are queued while we had the rtnl_lock held,
to maintain the current semantics.

So the retry may not be necessary as it may be possible to prove
that the only extra packets that could come in come from another
thread taking the rtnl_lock and they will those packets in their
rtnl_unlock() if we don't.

I will review this later today, and add the retry if necessary.

One way or another I think we agree on how to get the locking correct.
The other details are a bit tricky but look usable.

Eric
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH] [RFC] network namespace locking rules
Next Topic: Re: /proc/net/ bad hard links count [Was: 2.6.23-rc8-mm2]
Goto Forum:
  


Current Time: Wed Oct 08 23:47:35 GMT 2025

Total time taken to generate the page: 0.08557 seconds