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 <Trond.Myklebust@netapp.com>
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);
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: