From 4f082222fad3c8471abe0c8e8f18c72f335a34c7 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sun, 24 Oct 2010 13:14:02 -0400 Subject: [PATCH] NFSv4: nfs4_decode_dirent must clear entry->fattr->valid Otherwise, we may end up reading uninitialised data from the resulting struct nfs_fattr. Signed-off-by: Trond Myklebust --- fs/nfs/nfs4xdr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 707975eebb5d..9bf5e66d11db 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -5815,6 +5815,7 @@ __be32 *nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, * since glibc seems to choke on it...) */ entry->ino = 1; + entry->fattr->valid = 0; len = ntohl(*p++); /* bitmap length */ if (len-- > 0) { -- 2.34.1