linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Borisov <ext-roman.borisov@nokia.com>
To: linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>,
	Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs: fix unchecked value
Date: Tue, 19 Oct 2010 18:16:35 +0400	[thread overview]
Message-ID: <4CBDA843.7030809@nokia.com> (raw)
In-Reply-To: <a4f05d53b0912562f2950958831579f14c60dbb8.1286973348.git.ext-roman.borisov@nokia.com>

On 10/13/2010 04:54 PM, Roman Borisov wrote:
> Return value of "decode_attr_bitmap()" was not checked;
>
> Signed-off-by: Roman Borisov<ext-roman.borisov@nokia.com>
> ---
>   fs/nfs/nfs4xdr.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 6ea5c93..9e9cb40 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -2676,7 +2676,10 @@ out_overflow:
>   static int decode_attr_supported(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *bitmask)
>   {
>   	if (likely(bitmap[0]&  FATTR4_WORD0_SUPPORTED_ATTRS)) {
> -		decode_attr_bitmap(xdr, bitmask);
> +		int ret;
> +		ret = decode_attr_bitmap(xdr, bitmask);
> +		if (unlikely(ret<  0))
> +			return ret;
>   		bitmap[0]&= ~FATTR4_WORD0_SUPPORTED_ATTRS;
>   	} else
>   		bitmask[0] = bitmask[1] = 0;

Reviewed-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>

Hello,

could you please review the patch and send the comments if any

Thanks,
Roman Borisov

      reply	other threads:[~2010-10-19 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 12:54 [PATCH] nfs: fix unchecked value Roman Borisov
2010-10-19 14:16 ` Roman Borisov [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=4CBDA843.7030809@nokia.com \
    --to=ext-roman.borisov@nokia.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=ext-andriy.shevchenko@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).