From: Steve Dickson <SteveD@redhat.com>
To: NFSv4@linux-nfs.org
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] [NFSv4] Oops in error paths
Date: Thu, 29 Jul 2004 09:24:27 -0400 [thread overview]
Message-ID: <4108FA8B.5000305@RedHat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
Here are some oops I found in error paths in the mounting
pathes while debugging something else... I sent it out a while
ago, but it didn't seem to get any traction....
The nfs_fill_super() fix is obvious and in nfs4_fill_super(),
the server->client ptr needs to be set before the cl_idmap check,
since rpc_shutdown_client() needs it when the check fails.
SteveD.
[-- Attachment #2: linux-2.6.8-nfs-errorpaths.patch --]
[-- Type: text/plain, Size: 1185 bytes --]
--- linux-2.6.7/fs/nfs/inode.c.org 2004-06-16 01:19:44.000000000 -0400
+++ linux-2.6.7/fs/nfs/inode.c 2004-06-28 14:08:35.964873256 -0400
@@ -456,7 +456,7 @@ nfs_fill_super(struct super_block *sb, s
/* Create RPC client handles */
server->client = nfs_create_client(server, data);
- if (server->client == NULL)
+ if (IS_ERR(server->client))
goto out_fail;
/* RFC 2623, sec 2.3.2 */
if (authflavor != RPC_AUTH_UNIX) {
@@ -1550,16 +1550,17 @@ static int nfs4_fill_super(struct super_
err = PTR_ERR(clnt);
goto out_remove_list;
}
+
+ clnt->cl_intr = (server->flags & NFS4_MOUNT_INTR) ? 1 : 0;
+ clnt->cl_softrtry = (server->flags & NFS4_MOUNT_SOFT) ? 1 : 0;
+ server->client = clnt;
+
err = -ENOMEM;
if (server->nfs4_state->cl_idmap == NULL) {
printk(KERN_WARNING "NFS: failed to create idmapper.\n");
goto out_shutdown;
}
- clnt->cl_intr = (server->flags & NFS4_MOUNT_INTR) ? 1 : 0;
- clnt->cl_softrtry = (server->flags & NFS4_MOUNT_SOFT) ? 1 : 0;
- server->client = clnt;
-
if (clnt->cl_auth->au_flavor != authflavour) {
if (rpcauth_create(authflavour, clnt) == NULL) {
printk(KERN_WARNING "NFS: couldn't create credcache!\n");
reply other threads:[~2004-07-29 13:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4108FA8B.5000305@RedHat.com \
--to=steved@redhat.com \
--cc=NFSv4@linux-nfs.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.