All of lore.kernel.org
 help / color / mirror / Atom feed
* 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

only message in thread, other threads:[~2012-07-19  9:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAEMWVhsswo4SfRjVwDs5GG9g8t4hqkpqaan52xUq_XGi_E+L5w@mail.gmail.com>
     [not found] ` <1342603371-25211-1-git-send-email-idank@tonian.com>
2012-07-19  9:27   ` [PATCH] pnfs-obj: fix inline XDR size in _osd_xdr_decode_opaque_cred Boaz Harrosh

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.