Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3388bff5 authored by Roman Borisov's avatar Roman Borisov Committed by Trond Myklebust
Browse files

nfs: fix unchecked value



Return value of "decode_attr_bitmap()" was not checked;

Signed-off-by: default avatarRoman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 55b6e774
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2687,7 +2687,10 @@ static inline int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen,
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;