On Fri, Jun 08, 2012 at 11:32:56AM -0400, bjschuma@xxxxxxxxxx wrote: > From: Bryan Schumaker <bjschuma@xxxxxxxxxx> > > Older versions of nfs utils don't always pass a "vers=" mount option for > NFS. This chould lead to attempts at using NFS v0 due to a zeroed out > nfs_parsed_mount_data struct. I solve this by setting the default NFS > version to NFS_DEFAULT_VERSION in the v2 and v3 cases (v4 has already been > taken care of by a similar patch). > > Reported-by: Joerg Roedel <joro@&bytes.org> 8bytes.org > Signed-off-by: Bryan Schumaker <bjschuma@xxxxxxxxxx> > --- > fs/nfs/super.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index ff656c0..97a3b30 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -1867,6 +1867,7 @@ static int nfs23_validate_mount_data(void *options, > if (data == NULL) > goto out_no_data; > > + args->version = NFS_DEFAULT_VERSION; > switch (data->version) { > case 1: > data->namlen = 0; Hmm, I still think that the revert-patch is a better solution. The data-structure is allocated and initialized in nfs_alloc_parsed_mount_data() so this function is the logical place to also initialize the version-field with a meaningful value. Regards, Joerg -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html