From patchwork Mon Aug 22 13:51:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Broz X-Patchwork-Id: 1085362 Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7MDsJld009970 for ; Mon, 22 Aug 2011 13:54:40 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7MDq7XJ020261; Mon, 22 Aug 2011 09:52:07 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7MDq6C6001323 for ; Mon, 22 Aug 2011 09:52:06 -0400 Received: from tawny.mazyland.net (tawny.brq.redhat.com [10.34.26.53]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7MDpxXe019945; Mon, 22 Aug 2011 09:52:00 -0400 From: Milan Broz To: linux-kernel@vger.kernel.org Date: Mon, 22 Aug 2011 15:51:34 +0200 Message-Id: <1314021094-15453-1-git-send-email-mbroz@redhat.com> In-Reply-To: <4E4ECA5D.1020907@redhat.com> References: <4E4ECA5D.1020907@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: dm-devel@redhat.com Cc: greg@kroah.com, dm-devel@redhat.com, kay.sievers@vrfy.org, ebiederm@xmission.com, Milan Broz Subject: [dm-devel] [PATCH] kobj_uevent: Ignore if some listeners cannot handle message X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 22 Aug 2011 13:54:40 +0000 (UTC) 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) Signed-off-by: Milan Broz --- 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;