public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix broken handling of port=... in NFS option parsing
Date: Sun, 22 Jul 2007 11:52:34 -0400	[thread overview]
Message-ID: <1185119554.6577.2.camel@localhost> (raw)
In-Reply-To: <20070722095906.GX21668@ftp.linux.org.uk>

On Sun, 2007-07-22 at 10:59 +0100, Al Viro wrote:
> 	Obviously broken on little-endian; fortunately, the option is
> not frequently used...
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index b34b7a7..b2a851c 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -732,7 +732,7 @@ static int nfs_parse_mount_options(char *raw,
>  				return 0;
>  			if (option < 0 || option > 65535)
>  				return 0;
> -			mnt->nfs_server.address.sin_port = htonl(option);
> +			mnt->nfs_server.address.sin_port = htons(option);
>  			break;
>  		case Opt_rsize:
>  			if (match_int(args, &mnt->rsize))

ACK. Thanks Al!

   Trond

  reply	other threads:[~2007-07-22 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22  9:59 [PATCH] fix broken handling of port=... in NFS option parsing Al Viro
2007-07-22 15:52 ` Trond Myklebust [this message]
2007-07-23 16:05 ` Chuck Lever

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=1185119554.6577.2.camel@localhost \
    --to=trond.myklebust@netapp.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ftp.linux.org.uk \
    /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