All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Idan Kedar <idank@tonian.com>,
	Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Benny Halevy <bhalevy@tonian.com>,
	NFS list <linux-nfs@vger.kernel.org>,
	open-osd <osd-dev@open-osd.org>
Subject: Re: [PATCH] pnfs-obj: fix inline XDR size in _osd_xdr_decode_opaque_cred
Date: Thu, 19 Jul 2012 12:27:21 +0300	[thread overview]
Message-ID: <5007D2F9.6040500@panasas.com> (raw)
In-Reply-To: <1342603371-25211-1-git-send-email-idank@tonian.com>

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;



           reply	other threads:[~2012-07-19  9:27 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1342603371-25211-1-git-send-email-idank@tonian.com>]

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=5007D2F9.6040500@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bhalevy@tonian.com \
    --cc=idank@tonian.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=osd-dev@open-osd.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.