linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NFS: suppressing showing of default mount port value in /proc fixed
Date: Fri, 3 Dec 2010 12:35:04 -0500	[thread overview]
Message-ID: <7AF6FF7E-F57C-493B-8880-25509CC54EDE@oracle.com> (raw)
In-Reply-To: <20101203170138.22955.86546.stgit@localhost6.localdomain6>


On Dec 3, 2010, at 12:11 PM, Stanislav Kinsbursky wrote:

> Default value for mount server port is set to NFS_UNSPEC_PORT (-1) and will not
> be changed during parsing mount options for mound data version 6. This default
> value will be showed for mountport in /proc/mounts always since current default
> check is for zero value. This small mistake leads to big problem, because
> during umount.nfs execution from old user-space utils (at least nfs-utils
> 1.0.9) this value will be used as the server port to connect to. This request
> will be rejected (since port is 65535) and thus nfs mount point can't be
> unmounted.

Note: this is only possible if /etc/mtab is a link to /proc/mounts.  Not all systems have this configuration.

> 
> Kernel version affected: 2.6.37-rc4
> 
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
> 
> ---
> fs/nfs/super.c |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 6d6e21d..fd4cac8 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -681,7 +681,8 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
> 
> 	if (nfss->mountd_version || showdefaults)
> 		seq_printf(m, ",mountvers=%u", nfss->mountd_version);
> -	if (nfss->mountd_port || showdefaults)
> +	if (nfss->mountd_port != (unsigned short)NFS_UNSPEC_PORT ||
> +			showdefaults)
> 		seq_printf(m, ",mountport=%u", nfss->mountd_port);
> 
> 	nfs_show_mountd_netid(m, nfss, showdefaults);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





  reply	other threads:[~2010-12-03 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 17:11 [PATCH] NFS: suppressing showing of default mount port value in /proc fixed Stanislav Kinsbursky
2010-12-03 17:35 ` Chuck Lever [this message]
2010-12-03 18:01   ` Kinsbursky Stanislav
2010-12-03 18:17     ` Chuck Lever
2010-12-06  8:36       ` Kinsbursky Stanislav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7AF6FF7E-F57C-493B-8880-25509CC54EDE@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=skinsbursky@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).