Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755197Ab0L3Sv3 (ORCPT ); Thu, 30 Dec 2010 13:51:29 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59044 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755039Ab0L3Sv2 (ORCPT ); Thu, 30 Dec 2010 13:51:28 -0500 MIME-Version: 1.0 In-Reply-To: <1293733460.4919.21.camel@heimdal.trondhjem.org> References: <20101230171453.GA5787@pengutronix.de> <1293733460.4919.21.camel@heimdal.trondhjem.org> From: Linus Torvalds Date: Thu, 30 Dec 2010 10:50:34 -0800 Message-ID: Subject: Re: still nfs problems [Was: Linux 2.6.37-rc8] To: Trond Myklebust Cc: =?ISO-8859-1?Q?Uwe_Kleine=2DK=F6nig?= , Chuck Lever , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-nfs@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 29 On Thu, Dec 30, 2010 at 10:24 AM, Trond Myklebust wrote: > > There is nothing we can do to protect ourselves against an infinite loop > if the server (or underlying filesystem) is breaking the rules w.r.t. > cookie generation. It should be possible to recover from all other > situations. Umm. Sure there is. Just make sure that you return the uncached entry to user space, rather than loop forever. Looping forever in kernel space is a bad idea. How about just changing the "continue" into a "break" for the "uncached readdir returned success". No halting problems, no excuses. There is absolutely _no_ excuse for an endless loop in kernel mode. Certainly not "the other end is incompetent". EVERYBODY is incompetent sometimes. That just means that you must never trust the other end too much. You can't say "we require the server to be sane in order not to lock up". Linus -- 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/