summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorRoman Borisov2010-10-13 14:54:51 +0200
committerTrond Myklebust2010-10-25 00:00:12 +0200
commit3388bff5cfe91589a912cdc7f00d3aae3aa18adc (patch)
treed84d4642c70787d44c16dc842e263744dae729e9 /fs/nfs/nfs4xdr.c
parentAsk for time_delta during fsinfo probe (diff)
downloadkernel-qcow2-linux-3388bff5cfe91589a912cdc7f00d3aae3aa18adc.tar.gz
kernel-qcow2-linux-3388bff5cfe91589a912cdc7f00d3aae3aa18adc.tar.xz
kernel-qcow2-linux-3388bff5cfe91589a912cdc7f00d3aae3aa18adc.zip
nfs: fix unchecked value
Return value of "decode_attr_bitmap()" was not checked; Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 7131c761d85c..bd2101d918c8 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2687,7 +2687,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;