From 1ee6310119a5b4460324111a8c4536054356b963 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Dec 2020 13:11:11 -0500 Subject: [PATCH] NFSv4.2: Ensure we always reset the result->count in decode_read_plus() Signed-off-by: Trond Myklebust --- fs/nfs/nfs42xdr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c index c0b8fcd266c98..1c21db640f4d9 100644 --- a/fs/nfs/nfs42xdr.c +++ b/fs/nfs/nfs42xdr.c @@ -1087,6 +1087,7 @@ static int decode_read_plus(struct xdr_stream *xdr, struct nfs_pgio_res *res) if (unlikely(!p)) return -EIO; + res->count = 0; eof = be32_to_cpup(p++); segments = be32_to_cpup(p++); if (segments == 0) -- 2.30.2