Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64703
b: refs/heads/master
c: 7d1cca7
h: refs/heads/master
i:
  64701: c6d7ee4
  64699: 720eb5e
  64695: 8f90c7b
  64687: 0166898
  64671: d9d0e65
  64639: 5ce0438
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Sep 1, 2007
1 parent d8d9e9c commit 3cbfc51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 350c73af6af51ae7654dad91874c0d30dd13bbbe
refs/heads/master: 7d1cca72994c0e910ca443076dcfcfd473871dda
8 changes: 4 additions & 4 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,13 +1155,13 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
return -EINVAL;
len = c - dev_name;
if (len > sizeof(data->hostname))
return -EINVAL;
return -ENAMETOOLONG;
strncpy(data->hostname, dev_name, len);
args.nfs_server.hostname = data->hostname;

c++;
if (strlen(c) > NFS_MAXPATHLEN)
return -EINVAL;
return -ENAMETOOLONG;
args.nfs_server.export_path = c;

status = nfs_try_mount(&args, mntfh);
Expand Down Expand Up @@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
/* while calculating len, pretend ':' is '\0' */
len = c - dev_name;
if (len > NFS4_MAXNAMLEN)
return -EINVAL;
return -ENAMETOOLONG;
*hostname = kzalloc(len, GFP_KERNEL);
if (*hostname == NULL)
return -ENOMEM;
Expand All @@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
c++; /* step over the ':' */
len = strlen(c);
if (len > NFS4_MAXPATHLEN)
return -EINVAL;
return -ENAMETOOLONG;
*mntpath = kzalloc(len + 1, GFP_KERNEL);
if (*mntpath == NULL)
return -ENOMEM;
Expand Down

0 comments on commit 3cbfc51

Please sign in to comment.