* Re: [PATCH] pnfs-obj: fix inline XDR size in _osd_xdr_decode_opaque_cred
[not found] ` <1342603371-25211-1-git-send-email-idank@tonian.com>
@ 2012-07-19 9:27 ` Boaz Harrosh
0 siblings, 0 replies; only message in thread
From: Boaz Harrosh @ 2012-07-19 9:27 UTC (permalink / raw)
To: Idan Kedar, Trond Myklebust; +Cc: Benny Halevy, NFS list, open-osd
On 07/18/2012 12:22 PM, Idan Kedar wrote:
> if the length is __be32, at least sizeof(__be32) bytes have to be
> decoded. this is just semantics since __xdr_inline_decode rounds nbytes
> up by calling XDR_QUADLEN(nbytes), but the code is still better off
> fixed.
>
ACK-by: Boaz Harrosh <bharrosh@panasas.com>
> Signed-off-by: Idan Kedar <idank@tonian.com>
This is for Trond for the 3.6 merge window.
> ---
> fs/nfs/objlayout/pnfs_osd_xdr_cli.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/objlayout/pnfs_osd_xdr_cli.c b/fs/nfs/objlayout/pnfs_osd_xdr_cli.c
> index b3918f7..3845ece 100644
> --- a/fs/nfs/objlayout/pnfs_osd_xdr_cli.c
> +++ b/fs/nfs/objlayout/pnfs_osd_xdr_cli.c
> @@ -73,7 +73,7 @@ static int
> _osd_xdr_decode_opaque_cred(struct pnfs_osd_opaque_cred *opaque_cred,
> struct xdr_stream *xdr)
> {
> - __be32 *p = xdr_inline_decode(xdr, 1);
> + __be32 *p = xdr_inline_decode(xdr, sizeof(__be32));
>
> if (!p)
> return -EINVAL;
^ permalink raw reply [flat|nested] only message in thread