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 <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust 2010-10-24 13:14:02 -04:00
parent 3201f3dd73
commit 4f082222fa
1 changed files with 1 additions and 0 deletions

View File

@ -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) {