diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-24 13:14:02 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-10-24 13:14:02 -0400 |
commit | 4f082222fad3c8471abe0c8e8f18c72f335a34c7 (patch) | |
tree | b5c5eea011910f7b08991cb3779cc0eae9ae2598 /fs | |
parent | 3201f3dd7370f2d29dfb689ae16f8f5d4066cc33 (diff) | |
download | op-kernel-dev-4f082222fad3c8471abe0c8e8f18c72f335a34c7.zip op-kernel-dev-4f082222fad3c8471abe0c8e8f18c72f335a34c7.tar.gz |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 707975e..9bf5e66 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) { |