mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Milan Broz <mbroz@redhat.com>
Cc: linux-kernel@vger.kernel.org, dm-devel@redhat.com,
	kay.sievers@vrfy.org, greg@kroah.com
Subject: Re: [PATCH] kobj_uevent: Ignore if some listeners cannot handle message
Date: Mon, 22 Aug 2011 12:49:19 -0700	[thread overview]
Message-ID: <m1hb59w7k0.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <1314021094-15453-1-git-send-email-mbroz@redhat.com> (Milan Broz's message of "Mon, 22 Aug 2011 15:51:34 +0200")

Milan Broz <mbroz@redhat.com> writes:

> kobject_uevent() uses a multicast socket and should ignore
> if one of listeners cannot handle messages or nobody is
> listening at all.
>
> Easily reproducible when a process in system is cloned
> with CLONE_NEWNET flag.
>
> (See also
> http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/5256)

I am fine with the patch below.

However if you are fine with the patch below let's just remove the
return code from code from kobject_uevent_env.  We are now explicitly
ignoring all of the possible return codes from
netlink_broadcast_filtered.  

Ignoring all of the return codes from netlink_broadcast_filtered ignores
all of the expected errors from kobject_uevent_env, short of programmer
error.

So why have an error code on kobject_uevent_env?

> Signed-off-by: Milan Broz <mbroz@redhat.com>
> ---
>  lib/kobject_uevent.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
> index 70af0a7..ad72a03 100644
> --- a/lib/kobject_uevent.c
> +++ b/lib/kobject_uevent.c
> @@ -282,7 +282,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
>  							    kobj_bcast_filter,
>  							    kobj);
>  			/* ENOBUFS should be handled in userspace */
> -			if (retval == -ENOBUFS)
> +			if (retval == -ENOBUFS || retval == -ESRCH)
>  				retval = 0;
>  		} else
>  			retval = -ENOMEM;

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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18  9:45 clone() with CLONE_NEWNET breaks kobject_uevent_env() Milan Broz
2011-08-19  7:52 ` Milan Broz
2011-08-19  9:13 ` [dm-devel] " Eric W. Biederman
2011-08-19 10:22   ` Milan Broz
2011-08-19 11:43     ` 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
2011-08-22 13:51             ` [PATCH] kobj_uevent: Ignore if some listeners cannot handle message Milan Broz
2011-08-22 16:24               ` Kay Sievers
2011-08-22 19:49               ` Eric W. Biederman [this message]
2011-08-22 20:05                 ` Milan Broz
2011-08-19 10:26   ` [dm-devel] clone() with CLONE_NEWNET breaks kobject_uevent_env() Kay Sievers

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=m1hb59w7k0.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=dm-devel@redhat.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbroz@redhat.com \
    /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

Powered by JetHome