Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69240
b: refs/heads/master
c: 6e88e06
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Oct 9, 2007
1 parent 034aa65 commit 0554067
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 113632d00acb569420b14eb7575833ac7e2eb311
refs/heads/master: 6e88e0618cb1e354a44cc49a996df4dd89511039
12 changes: 8 additions & 4 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,10 @@ static int nfs_validate_mount_data(void *options,
if (mntfh->size < sizeof(mntfh->data))
memset(mntfh->data + mntfh->size, 0,
sizeof(mntfh->data) - mntfh->size);

if (!nfs_verify_server_address((struct sockaddr *) &data->addr))
goto out_no_address;

/*
* Translate to nfs_parsed_mount_data, which nfs_fill_super
* can deal with.
Expand Down Expand Up @@ -1131,6 +1135,10 @@ static int nfs_validate_mount_data(void *options,
if (nfs_parse_mount_options((char *)options, args) == 0)
return -EINVAL;

if (!nfs_verify_server_address((struct sockaddr *)
&args->nfs_server.address))
goto out_no_address;

c = strchr(dev_name, ':');
if (c == NULL)
return -EINVAL;
Expand Down Expand Up @@ -1159,10 +1167,6 @@ static int nfs_validate_mount_data(void *options,
goto out_v3_not_compiled;
#endif /* !CONFIG_NFS_V3 */

if (!nfs_verify_server_address((struct sockaddr *)
&args->nfs_server.address))
goto out_no_address;

return 0;

out_no_data:
Expand Down

0 comments on commit 0554067

Please sign in to comment.