lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 31 Oct 2010 12:08:10 -0400
From:	Trond Myklebust <Trond.Myklebust@...app.com>
To:	Paulius Zaleckas <paulius.zaleckas@...il.com>
Cc:	linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Regression: fix mounting NFS when NFSv3 support is not
 compiled

On Sun, 2010-10-31 at 17:58 +0200, Paulius Zaleckas wrote:
> Trying to mount NFS (root partition in my case) fails if CONFIG_NFS_V3
> is not selected. nfs_validate_mount_data() returns EPROTONOSUPPORT,
> because of this check:
> 
> #ifndef CONFIG_NFS_V3
> 	if (args->version == 3)
> 		goto out_v3_not_compiled;
> #endif /* !CONFIG_NFS_V3 */
> 
> and args->version was always initialized to 3.
> 
> It was working in 2.6.36
> 
> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@...il.com>
> ---
> 
>  fs/nfs/super.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 0a42e8f..8737017 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -2277,7 +2277,11 @@ static int nfs_get_sb(struct file_system_type *fs_type,
>  	};
>  	int error = -ENOMEM;
>  
> +#ifdef CONFIG_NFS_V3
>  	data = nfs_alloc_parsed_mount_data(3);
> +#else
> +	data = nfs_alloc_parsed_mount_data(2);
> +#endif
>  	mntfh = nfs_alloc_fhandle();
>  	if (data == NULL || mntfh == NULL)
>  		goto out_free_fh;
> 

Let's do this as

#ifdef CONFIG_NFS_V3
#define NFS_DEFAULT_VERSION 3
#else
#define NFS_DEFAULT_VERSION 2
#endif

	data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION);

instead.

Cheers
  Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ