From: Trond Myklebust <trondmy@primarydata.com>
To: Rob Landley <rob@landley.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Anna Schumaker <anna.schumaker@netapp.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] Fix NFS option parsing bit-rot.
Date: Mon, 6 Jun 2016 23:49:10 +0000 [thread overview]
Message-ID: <B4B27507-DD34-49D0-9BE9-01C9DA1A86FA@primarydata.com> (raw)
In-Reply-To: <57560021.5030708@landley.net>
On 6/6/16, 18:58, "Rob Landley" <rob@landley.net> wrote:
>From: Rob Landley <rob@landley.net>
>
>The kernel has string parsing code for NFS mount options, but it seems
>to have bit-rotted over the years, so toybox mount needs the following
>patch to be able to mount nfs. Without it, the kernel returns "invalid
>argument" before sending any network traffic.
>
>For more information, see
>http://lists.landley.net/pipermail/toybox-landley.net/2016-March/004790.html
>
>Signed-off-by: Rob Landley <rob@landley.net>
>---
>
> fs/nfs/super.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
>diff --git a/fs/nfs/super.c b/fs/nfs/super.c
>index 2137e02..863585d 100644
>--- a/fs/nfs/super.c
>+++ b/fs/nfs/super.c
>@@ -2130,11 +2130,23 @@ static int nfs_validate_text_mount_data(void *options,
> int port = 0;
> int max_namelen = PAGE_SIZE;
> int max_pathlen = NFS_MAXPATHLEN;
>+ int rc;
> struct sockaddr *sap = (struct sockaddr *)&args->nfs_server.address;
>
> if (nfs_parse_mount_options((char *)options, args) == 0)
> return -EINVAL;
>
>+ rc = nfs_parse_devname(dev_name,
>+ &args->nfs_server.hostname,
>+ max_namelen,
>+ &args->nfs_server.export_path,
>+ max_pathlen);
>+
>+ args->nfs_server.addrlen = rpc_pton(args->net,
>+ args->nfs_server.hostname,
>+ strlen(args->nfs_server.hostname),
>+ sap, sizeof(args->nfs_server.address));
>+
That will scribble over the parsed address.
Trond
next prev parent reply other threads:[~2016-06-06 23:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 22:58 Rob Landley
2016-06-06 23:49 ` Trond Myklebust [this message]
2016-06-08 19:41 ` Rob Landley
2016-06-08 20:35 ` Trond Myklebust
2016-06-08 21:51 ` Rob Landley
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=B4B27507-DD34-49D0-9BE9-01C9DA1A86FA@primarydata.com \
--to=trondmy@primarydata.com \
--cc=anna.schumaker@netapp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=rob@landley.net \
/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
Powered by JetHome