Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759329Ab1EMObZ (ORCPT ); Fri, 13 May 2011 10:31:25 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:37862 "EHLO mail-px0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758712Ab1EMObX convert rfc822-to-8bit (ORCPT ); Fri, 13 May 2011 10:31:23 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=m/jN+50EpbNqwJVL4bM8RI61T3RRKREZGV5ENWh+cSSMJyL45fGWhMZLvRPN0JC1DX dc6Oo9zgYdKCTqHazgEcd+aO8vgWWQeo+iqz1AGSztXFOk1VOIvTeAW4EjVATNEZjJS7 e+wh7KXNRiwF8pL9ob0AqTeV7HrZnIBiQK/bg= MIME-Version: 1.0 In-Reply-To: <20110513103202.GA27578@infradead.org> References: <1305147805-5756-1-git-send-email-shawn.p.huang@gmail.com> <20110513103202.GA27578@infradead.org> Date: Fri, 13 May 2011 10:31:22 -0400 Message-ID: Subject: Re: [PATCH] nfs: check a crash in nfs_lookup_revalidate From: Peng Huang To: Christoph Hellwig Cc: Trond Myklebust , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 924 Lines: 21 I did not write any code to call lookup_one_len(). I just mounted an ecryptfs on nfs, and then got the oops. So it should be a problem in nfs or ecryptfs or both. At least it should not crash. Peng On Fri, May 13, 2011 at 6:32 AM, Christoph Hellwig wrote: > On Wed, May 11, 2011 at 05:03:25PM -0400, Peng Huang wrote: >> lookup_one_len() may call nfs_loopup_revalidate() with nd == NULL >> indirectly, that causes the kernel crash. > > lookup_one_len must only be called by a filesystem or a library function > called by the filesystem.  You are not allowed to call it on a random > filesystem like nfs that doesn't support the underlying assumptions. > > -- 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/