Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941427AbcJXRRl (ORCPT ); Mon, 24 Oct 2016 13:17:41 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36250 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934250AbcJXRRd (ORCPT ); Mon, 24 Oct 2016 13:17:33 -0400 MIME-Version: 1.0 In-Reply-To: References: <1477017986-18889-1-git-send-email-avagin@openvz.org> From: Cong Wang Date: Mon, 24 Oct 2016 10:17:12 -0700 Message-ID: Subject: Re: [PATCH] net: skip genenerating uevents for network namespaces that are exiting To: Andrey Vagin 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: 1129 Lines: 28 On Sat, Oct 22, 2016 at 12:37 AM, Andrey Vagin wrote: > 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. I missed it, it makes sense now. Please consider adding a comment in the code or expanding your changelog for reference. Thanks!