roybabayov@gmail.com has uploaded this change for review.
Don't keep READDIR replies in the NFSv4.1 reply cache
- A READDIR reply hands its entries buffer to the transport, which frees
it once the reply is sent, but the slot reply cache still points to it.
- So replaying a READDIR request that asked to be cached (sa_cachethis)
sends freed heap memory and calls a release function read from freed
memory.
- Return NFS4ERR_REP_TOO_BIG_TO_CACHE (the RFC 8881 error for a reply
the server can't cache) for READDIR in such requests; the Linux client
never asks to cache READDIR replies, so it isn't affected.
- Also fix the size of the entries' xdr_uio allocation, which added
sizeof(struct xdr_uio) instead of sizeof(struct xdr_vio).
Change-Id: I7a1ebb72821169b2c3393ca00ce3553d58a9a0be
Signed-off-by: Roy Babayov <roybabayov@google.com>
---
M src/Protocols/NFS/nfs4_op_readdir.c
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/49/1259049/1
To view, visit change 1259049. To unsubscribe, or for help writing mail filters, visit settings.