Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934263AbcJVHhF (ORCPT ); Sat, 22 Oct 2016 03:37:05 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:33512 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111AbcJVHhD (ORCPT ); Sat, 22 Oct 2016 03:37:03 -0400 MIME-Version: 1.0 In-Reply-To: References: <1477017986-18889-1-git-send-email-avagin@openvz.org> From: Andrey Vagin Date: Sat, 22 Oct 2016 00:37:01 -0700 X-Google-Sender-Auth: tPy0F1CdMclh6YInNDdbV9sNr9U Message-ID: Subject: Re: [PATCH] net: skip genenerating uevents for network namespaces that are exiting To: Cong Wang Cc: LKML , Linux Containers , Linux Kernel Network Developers , "David S. Miller" , "Eric W . Biederman" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 32 Hi Cong, On Thu, Oct 20, 2016 at 10:25 PM, Andrey Vagin wrote: > On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote: >> On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: >>> No one can see these events, because a network namespace can not be >>> destroyed, if it has sockets. >>> >> >> Are you sure? kobject_uevent_env() seems sending uevents to all >> network namespaces. > > kobj_bcast_filter() checks that a kobject namespace is equal to a > socket namespace. Today I've checked that it really works as I read from the source code. I use this tool to read events: https://gist.github.com/avagin/430ba431fc2972002df40ebe6a048b36 And I see that events from non-network devices are delivered to all sockets, but events from network devices are delivered only to sockets from a network namespace where a device is operated. Thanks, Andrei > > >> _______________________________________________ >> Containers mailing list >> Containers@lists.linux-foundation.org >> https://lists.linuxfoundation.org/mailman/listinfo/containers