Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a87cf128f3d3bc6aa7b1040e73109c974ed875a
Commit:     0a87cf128f3d3bc6aa7b1040e73109c974ed875a
Parent:     f9d888fcd9665b863fa042212a3ee7b4c51399f6
Author:     Jeff Layton <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 11:28:43 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 15:21:40 2007 -0400

    NFSv4: handle lack of clientaddr in option string
    
    If a NFSv4 mount is attempted  with string based options, and the
    option string doesn't contain a clientaddr= option, the kernel will
    currently oops. Check for this situation and return a proper error.
    
    Signed-off-by: Jeff Layton <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/super.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index adffe16..b34b7a7 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1685,6 +1685,9 @@ static int nfs4_validate_mount_data(struct 
nfs4_mount_data **options,
 
                dprintk("MNTPATH: %s\n", *mntpath);
 
+               if (args.client_address == NULL)
+                       goto out_no_client_address;
+
                *ip_addr = args.client_address;
 
                break;
@@ -1705,6 +1708,10 @@ out_inval_auth:
 out_no_address:
        dfprintk(MOUNT, "NFS4: mount program didn't pass remote address\n");
        return -EINVAL;
+
+out_no_client_address:
+       dfprintk(MOUNT, "NFS4: mount program didn't pass callback address\n");
+       return -EINVAL;
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to