From: "J. Bruce Fields" <bfields@fieldses.org>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] nfsd4: fix xdr4 count of server in fs_location4
Date: Tue, 9 Dec 2014 12:37:10 -0500 [thread overview]
Message-ID: <20141209173710.GM20526@fieldses.org> (raw)
In-Reply-To: <d602d4a37d02801659ddf5e6f012453b89169f70.1417985975.git.bcodding@redhat.com>
On Sun, Dec 07, 2014 at 04:05:48PM -0500, Benjamin Coddington wrote:
> Fix a bug where nfsd4_encode_components_esc() incorrectly calculates the
> length of server array in fs_location4.
Thanks, applying as follows.
This is something I don't test regularly but should.
--b.
commit 3e376626896b
Author: Benjamin Coddington <bcodding@redhat.com>
Date: Sun Dec 7 16:05:48 2014 -0500
nfsd4: fix xdr4 count of server in fs_location4
Fix a bug where nfsd4_encode_components_esc() incorrectly calculates the
length of server array in fs_location4--note that it is a count of the
number of array elements, not a length in bytes.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Fixes: 082d4bd72a45 (nfsd4: "backfill" using write_bytes_to_xdr_buf)
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index a8549f8fef57..e578c87d5527 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1817,7 +1817,7 @@ static __be32 nfsd4_encode_components_esc(struct xdr_stream *xdr, char sep,
str = end;
}
- pathlen = htonl(xdr->buf->len - pathlen_offset);
+ pathlen = htonl(count);
write_bytes_to_xdr_buf(xdr->buf, pathlen_offset, &pathlen, 4);
return 0;
}
prev parent reply other threads:[~2014-12-09 17:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-07 21:05 [PATCH 0/2] Two nfsd referral xdr encoding bugs Benjamin Coddington
2014-12-07 21:05 ` [PATCH 1/2] nfsd4: fix xdr4 inclusion of escaped char Benjamin Coddington
2014-12-09 19:24 ` J. Bruce Fields
2014-12-09 19:57 ` Benjamin Coddington
2014-12-07 21:05 ` [PATCH 2/2] nfsd4: fix xdr4 count of server in fs_location4 Benjamin Coddington
2014-12-09 17:37 ` J. Bruce Fields [this message]
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=20141209173710.GM20526@fieldses.org \
--to=bfields@fieldses.org \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.