From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 02/14] sysfs: In sysfs_lookup protect s_parent with sysfs_mutex Date: Tue, 31 Jul 2007 19:36:39 +0900 Message-ID: <46AF10B7.3070600@suse.de> References: <1182446577.8138.29.camel@localhost> <46A3B449.3090409@gmail.com> <20070722202508.GA18018@suse.de> <46A425F9.1030008@gmail.com> <46AD8E92.7080002@suse.de> <46ADDC7F.1090306@sw.ru> <46ADE24E.8020502@suse.de> <46ADEE35.8000109@sw.ru> <46ADF003.3010100@suse.de> <46AEAF79.6080404@suse.de> <46AEBA87.6000400@suse.de> <46AEEF75.2030101@suse.de> <46AEEFA6.4000901@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: Linux Containers , Greg KH , Greg KH , Dave Hansen List-Id: containers.vger.kernel.org Eric W. Biederman wrote: > It turns out we have been being silly and have failed to > protect ourselves against races between sysfs_lookup > and operations that modify the sysfs directory like sysfs_readdir > and create_dir. > > So this patch modifies sysfs_lookup to grab sysfs_mutex before > walking the parent->s_children list. Updated portion of #01 and #02 are identical to the cleanup patches I just posted. :-) -- tejun