From patchwork Wed Apr 13 20:42:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Schumaker X-Patchwork-Id: 91107 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2DCB21007D5 for ; Thu, 14 Apr 2011 06:43:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932636Ab1DMUmo (ORCPT ); Wed, 13 Apr 2011 16:42:44 -0400 Received: from mx2.netapp.com ([216.240.18.37]:21145 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932379Ab1DMUmn (ORCPT ); Wed, 13 Apr 2011 16:42:43 -0400 X-IronPort-AV: E=Sophos;i="4.64,206,1301900400"; d="scan'208";a="541172596" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 13 Apr 2011 13:42:42 -0700 Received: from [10.30.16.245] (davros.hq.netapp.com [10.30.16.245]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p3DKgXBq021812; Wed, 13 Apr 2011 13:42:34 -0700 (PDT) Message-ID: <4DA60AB9.1050104@netapp.com> Date: Wed, 13 Apr 2011 16:42:33 -0400 From: Bryan Schumaker User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Lightning/1.0b2 Lanikai/3.1.9 MIME-Version: 1.0 To: Jiri Slaby CC: Trond Myklebust , Jiri Slaby , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, mm-commits@vger.kernel.org, ML netdev , linux-nfs@vger.kernel.org Subject: Re: [PATCH] NFS: Fix infinite loop in gss_create_upcall() References: <201103312224.p2VMOA5g000983@imap1.linux-foundation.org> <4D96E4C5.2080302@suse.cz> <1302122693.16786.0.camel@lade.trondhjem.org> <4D9D5CC9.2040002@suse.cz> <4DA36722.2020402@suse.cz> <4DA36758.4070203@suse.cz> <4DA36DB6.8060108@suse.cz> <4DA48EB0.40600@netapp.com> <4DA4946D.5020403@suse.cz> <1302633088.4801.48.camel@lade.trondhjem.org> <4DA49B49.1020005@suse.cz> <4DA49D3A.7090800@netapp.com> <4DA49F7F.8060005@suse.cz> In-Reply-To: <4DA49F7F.8060005@suse.cz> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 04/12/2011 02:52 PM, Jiri Slaby wrote: > On 04/12/2011 08:43 PM, Bryan Schumaker wrote: >> On 04/12/2011 02:34 PM, Jiri Slaby wrote: >>> On 04/12/2011 08:31 PM, Trond Myklebust wrote: >>>>> Yes, it fixes the problem. But it waits 15s before it times out. This is >>>>> inacceptable for automounted NFS dirs. >>>> >>>> I'm still confused as to why you are hitting it at all. In the normal >>>> autonegotiation case, the client should be trying to use AUTH_SYS first >>>> and then trying rpcsec_gss if and only if that fails. >>>> >>>> Are you really exporting a filesystem using AUTH_NULL as the only >>>> supported flavour? >>> >>> I don't know, I connect to a nfs server which is not maintained by me. >>> It looks like that. How can I find out? >> >> If you're not using gss for anything, you could try rmmod-ing rpcsec_gss_krb5 (and other rpcsec_gss_* modules). > > I don't have NFS in modules. It's all built-in. And this one is > unconditionally selected because of CONFIG_NFS_V4. Does this patch help? - Bryan We should attempt an AUTH_NULL style mount before trying gss flavors. This should prevent a hang if gss modules are loaded but the userspace program isn't running. > > regards, --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 9bf41ea..4e3c16b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2218,8 +2218,8 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, rpc_authflavor_t flav_array[NFS_MAX_SECFLAVORS + 2]; flav_array[0] = RPC_AUTH_UNIX; - len = gss_mech_list_pseudoflavors(&flav_array[1]); - flav_array[1+len] = RPC_AUTH_NULL; + flav_array[1] = RPC_AUTH_NULL; + len = gss_mech_list_pseudoflavors(&flav_array[2]); len += 2; for (i = 0; i < len; i++) {