From: "Denis V. Lunev" <den@sw•ru>
To: "Eric W. Biederman" <ebiederm@xmission•com>
Cc: David Miller <davem@davemloft•net>,
Daniel Lezcano <dlezcano@fr•ibm.com>,
Benjamin Thery <benjamin.thery@bull•net>,
Kirill Korotaev <dev@sw•ru>,
Linux Containers <containers@lists•osdl.org>,
netdev@vger•kernel.org
Subject: Re: [PATCH] netns: Simplify the network namespace list locking rules.
Date: Thu, 27 Sep 2007 09:21:56 +0400 [thread overview]
Message-ID: <46FB3DF4.10309@sw.ru> (raw)
In-Reply-To: <m1r6kkrce0.fsf@ebiederm.dsl.xmission.com>
Eric W. Biederman wrote:
> 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>
Acked-by: Denis V. Lunev <den@openvz•org>
next prev parent reply other threads:[~2007-09-27 5:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46F3C777.7070103@sw.ru>
2007-09-27 3:54 ` [PATCH] netns: Simplify the network namespace list locking rules Eric W. Biederman
2007-09-27 5:21 ` Denis V. Lunev [this message]
2007-09-27 5:40 ` David Miller
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=46FB3DF4.10309@sw.ru \
--to=den@sw$(echo .)ru \
--cc=benjamin.thery@bull$(echo .)net \
--cc=containers@lists$(echo .)osdl.org \
--cc=davem@davemloft$(echo .)net \
--cc=dev@sw$(echo .)ru \
--cc=dlezcano@fr$(echo .)ibm.com \
--cc=ebiederm@xmission$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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