diff options
| author | Roman Borisov <ext-roman.borisov@nokia.com> | 2010-10-13 08:54:51 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-24 18:00:12 -0400 |
| commit | 3388bff5cfe91589a912cdc7f00d3aae3aa18adc (patch) | |
| tree | d84d4642c70787d44c16dc842e263744dae729e9 | |
| parent | 55b6e7742d5b25182edf410369379b9727b2e5bc (diff) | |
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>
| -rw-r--r-- | 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 7131c761d85c..bd2101d918c8 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
| @@ -2687,7 +2687,10 @@ out_overflow: | |||
| 2687 | static int decode_attr_supported(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *bitmask) | 2687 | static int decode_attr_supported(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t *bitmask) |
| 2688 | { | 2688 | { |
| 2689 | if (likely(bitmap[0] & FATTR4_WORD0_SUPPORTED_ATTRS)) { | 2689 | if (likely(bitmap[0] & FATTR4_WORD0_SUPPORTED_ATTRS)) { |
| 2690 | decode_attr_bitmap(xdr, bitmask); | 2690 | int ret; |
| 2691 | ret = decode_attr_bitmap(xdr, bitmask); | ||
| 2692 | if (unlikely(ret < 0)) | ||
| 2693 | return ret; | ||
| 2691 | bitmap[0] &= ~FATTR4_WORD0_SUPPORTED_ATTRS; | 2694 | bitmap[0] &= ~FATTR4_WORD0_SUPPORTED_ATTRS; |
| 2692 | } else | 2695 | } else |
| 2693 | bitmask[0] = bitmask[1] = 0; | 2696 | bitmask[0] = bitmask[1] = 0; |
