Commit 41089644 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

fix broken handling of port=... in NFS option parsing

Obviously broken on little-endian; fortunately, the option is not
frequently used...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
[ Hey, sparse is wonderful, but even better than sparse is having people
  like Al that actually _run_ it and fix bugs using it.    - Linus ]
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 77668791
...@@ -732,7 +732,7 @@ static int nfs_parse_mount_options(char *raw, ...@@ -732,7 +732,7 @@ static int nfs_parse_mount_options(char *raw,
return 0; return 0;
if (option < 0 || option > 65535) if (option < 0 || option > 65535)
return 0; return 0;
mnt->nfs_server.address.sin_port = htonl(option); mnt->nfs_server.address.sin_port = htons(option);
break; break;
case Opt_rsize: case Opt_rsize:
if (match_int(args, &mnt->rsize)) if (match_int(args, &mnt->rsize))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment