Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=20c71f5e0f954b00d75009542db2c1f844d94a1e
Commit: 20c71f5e0f954b00d75009542db2c1f844d94a1e
Parent: 91ea40b9c6303ddab5c84f078f96b29084b45817
Author: Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 20 20:23:51 2007 -0400
Committer: Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 17:17:31 2007 -0400
NFSv4: Fix a bug in nfs4_validate_mount_data()
The previous patch introduced a bug when copying the server address.
Also clarify a copy into the auth_flavours array: currently the two
size calculations are equivalent, but we may decide to change the size
of auth_flavors[] at some point.
Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
fs/nfs/super.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 63742bb..3804aad 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1541,7 +1541,7 @@ static int nfs4_validate_mount_data(void *options,
goto out_no_address;
if (copy_from_user(&args->nfs_server.address,
data->host_addr,
- sizeof(&args->nfs_server.address)))
+ sizeof(args->nfs_server.address)))
return -EFAULT;
if (args->nfs_server.address.sin_port == 0)
args->nfs_server.address.sin_port = htons(NFS_PORT);
@@ -1554,9 +1554,9 @@ static int nfs4_validate_mount_data(void *options,
args->auth_flavors[0] = RPC_AUTH_UNIX;
break;
case 1:
- if (copy_from_user(args->auth_flavors,
+ if (copy_from_user(&args->auth_flavors[0],
data->auth_flavours,
- sizeof(args->auth_flavors)))
+ sizeof(args->auth_flavors[0])))
return -EFAULT;
break;
default:
-
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