This is a note to let you know that I've just added the patch titled

    NFSv3: Ensure that do_proc_get_root() reports errors correctly

to the 3.5-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsv3-ensure-that-do_proc_get_root-reports-errors-correctly.patch
and it can be found in the queue-3.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 086600430493e04b802bee6e5b3ce0458e4eb77f Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Mon, 20 Aug 2012 12:42:15 -0400
Subject: NFSv3: Ensure that do_proc_get_root() reports errors correctly

From: Trond Myklebust <[email protected]>

commit 086600430493e04b802bee6e5b3ce0458e4eb77f upstream.

If the rpc call to NFS3PROC_FSINFO fails, then we need to report that
error so that the mount fails. Otherwise we can end up with a
superblock with completely unusable values for block sizes, maxfilesize,
etc.

Reported-by: Yuanming Chen <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/nfs/nfs3proc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -69,7 +69,7 @@ do_proc_get_root(struct rpc_clnt *client
        nfs_fattr_init(info->fattr);
        status = rpc_call_sync(client, &msg, 0);
        dprintk("%s: reply fsinfo: %d\n", __func__, status);
-       if (!(info->fattr->valid & NFS_ATTR_FATTR)) {
+       if (status == 0 && !(info->fattr->valid & NFS_ATTR_FATTR)) {
                msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR];
                msg.rpc_resp = info->fattr;
                status = rpc_call_sync(client, &msg, 0);


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.5/nfsv4.1-remove-a-bogus-bug_on-in-nfs4_layoutreturn_done.patch
queue-3.5/pnfs-defer-release-of-pages-in-layoutget.patch
queue-3.5/nfsv3-ensure-that-do_proc_get_root-reports-errors-correctly.patch
queue-3.5/nfs-tear-down-caches-in-nfs_init_writepagecache-when-allocation-fails.patch
queue-3.5/nfs-clear-key-construction-data-if-the-idmap-upcall-fails.patch
queue-3.5/nfs-return-enokey-when-the-upcall-fails-to-map-the-name.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to