Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758396AbYJGVYo (ORCPT ); Tue, 7 Oct 2008 17:24:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756544AbYJGVY3 (ORCPT ); Tue, 7 Oct 2008 17:24:29 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:41931 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756095AbYJGVY2 (ORCPT ); Tue, 7 Oct 2008 17:24:28 -0400 Subject: Re: [PATCH 2/3] sysfs: Fix and sysfs_mv_dir by using lock_rename. From: Dave Hansen To: "Eric W. Biederman" Cc: Greg KH , Al Viro , Benjamin Thery , linux-kernel@vger.kernel.org, "Serge E. Hallyn" , Al Viro , Linus Torvalds , Tejun Heo In-Reply-To: References: <48D7AC44.6050208@bull.net> <20080922153455.GA6238@kroah.com> <48D8FC1E.6000601@bull.net> <20081003101331.GH28946@ZenIV.linux.org.uk> <20081005053236.GA9472@kroah.com> Content-Type: text/plain Date: Tue, 07 Oct 2008 14:21:09 -0700 Message-Id: <1223414469.31401.18.camel@nimitz> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 707 Lines: 18 On Tue, 2008-10-07 at 03:51 -0700, Eric W. Biederman wrote: > sysfs_mv_dir picks an arbitrary mutex lock ordering and busy waits > until it can grab the inode mutexes in that order. This can dead lock > on UP systems. > > Instead use the generic lock_rename that guarantees we grab parent > directories before child directories, so there is not need to spin and > no chance of deadlock. This is a vast improvement over what was there before. Nice! -- Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/