Skip to content

Commit

Permalink
NFSv4: nfs4_decode_dirent must clear entry->fattr->valid
Browse files Browse the repository at this point in the history
Otherwise, we may end up reading uninitialised data from the resulting
struct nfs_fattr.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 24, 2010
1 parent 3201f3d commit 4f08222
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4f08222

Please sign in to comment.