public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix broken handling of port=... in NFS option parsing
@ 2007-07-22  9:59 Al Viro
  2007-07-22 15:52 ` Trond Myklebust
  2007-07-23 16:05 ` Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Al Viro @ 2007-07-22  9:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Chuck Lever, Trond Myklebust, linux-kernel

	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))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-23 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-22  9:59 [PATCH] fix broken handling of port=... in NFS option parsing Al Viro
2007-07-22 15:52 ` Trond Myklebust
2007-07-23 16:05 ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox