From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [RFC] breakage in sysfs_readdir() and s_instances abuse in sysfs Date: Tue, 7 Jun 2011 22:58:34 +0100 Message-ID: <20110607215834.GR11521@ZenIV.linux.org.uk> References: <20110604001518.GT11521@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Linus Torvalds , netdev@vger.kernel.org, Linux Containers To: "Eric W. Biederman" Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:39723 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758763Ab1FGV6g (ORCPT ); Tue, 7 Jun 2011 17:58:36 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jun 06, 2011 at 12:03:52PM -0700, Eric W. Biederman wrote: > Other pieces of information that should be helpful to know. > - All sysfs directory entries for a network namespace should be > removed from sysfs by the time sysfs_exit_ns is called. Then why do we need to do _anything_ with ->ns[...]? Is there any problem with postponing actual freeing of that sucker until after umount, so that memory doesn't get reused? Since everything stale should be gone by the point when sysfs_exit_ns() would put NULL into ->ns[...], we can as well keep the old pointer in there - it won't match anything else for as long as the struct net is not freed...