From: Alan Cox Subject: Re: [PATCH, RESEND] locks: fix possible infinite loop in posix deadlock detection Date: Tue, 30 Oct 2007 15:35:56 +0000 Message-ID: <20071030153556.3c6cfa29@the-village.bc.nu> References: <20071017185157.GC3785@mvista.com> <20071018185759.GU3785@mvista.com> <20071026170750.GC13033@fieldses.org> <20071026224707.GO13033@fieldses.org> <20071028173136.GA16905@fieldses.org> <20071030152002.GA21595@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Linus Torvalds , stable@kernel.org, linux-kernel@vger.kernel.org, "George G. Davis" , Andrew Morton , linux-fsdevel@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:60009 "EHLO the-village.bc.nu" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755547AbXJ3Pen (ORCPT ); Tue, 30 Oct 2007 11:34:43 -0400 In-Reply-To: <20071030152002.GA21595@fieldses.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 30 Oct 2007 11:20:02 -0400 "J. Bruce Fields" wrote: > From: J. Bruce Fields > > It's currently possible to send posix_locks_deadlock() into an infinite > loop (under the BKL). > > For now, fix this just by bailing out after a few iterations. We may > want to fix this in a way that better clarifies the semantics of > deadlock detection. But that will take more time, and this minimal fix > is probably adequate for any realistic scenario, and is simple enough to > be appropriate for applying to stable kernels now. > > Thanks to George Davis for reporting the problem. > > Cc: "George G. Davis" > Signed-off-by: J. Bruce Fields Acked-by: Alan Cox Its a good fix for now and I doubt any real world user has that complex a locking pattern to break.