Linux Container Development
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: device-mapper development <dm-devel@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	"David S. Miller" <davem@davemloft.net>,
	containers@lists.osdl.org
Subject: Re: [dm-devel] clone() with CLONE_NEWNET breaks kobject_uevent_env()
Date: Fri, 19 Aug 2011 12:22:19 +0200	[thread overview]
Message-ID: <4E4E395B.7070106@redhat.com> (raw)
In-Reply-To: <m17h69sr03.fsf@fess.ebiederm.org>


On 08/19/2011 11:13 AM, Eric W. Biederman wrote:
> Milan Broz <mbroz@redhat.com> writes:
> 
> I think the proper fix is to remove the error return from
> kobject_uevent_env and kobject_uevent, and make it harder to get calling
> of this function wrong.  Possibly in conjunction with that tag all of
> the memory allocations of kobject_uevent_env with GFP_NOFAIL or
> something so the memory allocator knows that this path is totally
> not able to deal with failure.
> 
> Is kobject_uevent_env anything except an asynchronous best effort
> notification to user-space that a device has come or gone?

Unfortunately it is for device-mapper. libdevmapper
depends on information that uevent was sent because udev rules uses
semaphore to inform that some action was taken.
So if dm-ioctl returns flag that uevent was not sent, it fallback
to different error path (otherwise it waits for completion forever).
(TBH I am more and more convinced this was not quite clever concept.)

But the whole concept "send event to the list of namespaces, maybe someone listen"
seems also not quite clever to me :-)

How much time consuming is that? If you create thousand(s) of cloned namespaces,
how it will perform with uevent notification performance?
(IOW first event is sent through netlink and 999+ reports failure... strange.)

Milan

  parent reply	other threads:[~2011-08-19 10:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4E4CDF44.5080109@redhat.com>
2011-08-19  7:52 ` clone() with CLONE_NEWNET breaks kobject_uevent_env() Milan Broz
     [not found] ` <m17h69sr03.fsf@fess.ebiederm.org>
2011-08-19 10:22   ` Milan Broz [this message]
2011-08-19 11:43     ` [dm-devel] " Eric W. Biederman
2011-08-19 11:59       ` Milan Broz
2011-08-19 18:39         ` Eric W. Biederman
2011-08-19 20:41           ` Milan Broz

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=4E4E395B.7070106@redhat.com \
    --to=mbroz@redhat.com \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=dm-devel@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@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