summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever2009-06-18 03:02:14 +0200
committerTrond Myklebust2009-06-18 03:02:14 +0200
commita5a16bae707cd5d2bc97d7bd1a30079f18113a77 (patch)
treedbd8012bbba334e92edae060806eebc73d4338ad /net
parentNFS: Invalid mount option values should always fail, even with "sloppy" (diff)
downloadkernel-qcow2-linux-a5a16bae707cd5d2bc97d7bd1a30079f18113a77.tar.gz
kernel-qcow2-linux-a5a16bae707cd5d2bc97d7bd1a30079f18113a77.tar.xz
kernel-qcow2-linux-a5a16bae707cd5d2bc97d7bd1a30079f18113a77.zip
NFS: More "sloppy" parsing problems
Specifying "port=-5" with the kernel's current mount option parser generates "unrecognized mount option". If "sloppy" is set, this causes the mount to succeed and use the default values; the desired behavior is that, since this is a valid option with an invalid value, the mount should fail, even with "sloppy." To properly handle "sloppy" parsing, we need to distinguish between correct options with invalid values, and incorrect options. We will need to parse integer values by hand, therefore, and not rely on match_token(). For instance, these must all fail with "invalid value": port=12345678 port=-5 port=samuel and not with "unrecognized option," as they do currently. Thus, for the sake of match_token() we need to treat the values for these options as strings, and do the conversion to integers using strict_strtol(). This is basically the same solution we used for the earlier "retry=" fix (commit ecbb3845), except in this case the kernel actually has to parse the value, rather than ignore it. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions