summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-09-08 19:50:07 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-09-08 19:50:07 -0400
commit2ecda72b49a0849ce41e7fa1fa974a245b9119f8 (patch)
treed0c4eb474536581d79ae41ab72cb24c10571c83a /fs/nfs
parent764302ccb88dd0df062eccd507b6c6de24f1c560 (diff)
NFSv4: Disallow 'mount -t nfs4 -overs=2' and 'mount -t nfs4 -overs=3'
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 34b1ccf51ad..867f7050453 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2321,6 +2321,12 @@ static int nfs4_validate_text_mount_data(void *options,
nfs4_validate_mount_flags(args);
+ if (args->version != 4) {
+ dfprintk(MOUNT,
+ "NFS4: Illegal mount version\n");
+ return -EINVAL;
+ }
+
if (args->auth_flavor_len > 1) {
dfprintk(MOUNT,
"NFS4: Too many RPC auth flavours specified\n");