shaharhoch@gmail.com has uploaded this change for review.
PSEUDO_FSAL: Fix access to non-initialized structs in handle
In verify_handle_is_valid we accessed the state_hdl, but it wasn't
initialized. It is only initialized in MDCache, and so we cannot access
if from within the FSAL. This could cause a segmentation fault.
I removed verify_handle_is_valid, but it was intended to prevent a race
where a lookup returns a file handle before the export update process
is done updating its junction_export.
In order to avoid this race I changed lookup and readdir to always
return ERR_FSAL_DELAY when export update is in progress.
This caused another issue, where the export update process itself calls
lookup when it creates the node. In order to allow it to get the correct
response during the export update I use op_ctx->fsal_private to signal
to the FSAL that it should return the current response.
Change-Id: If1f3065525f68ba67499d4981b068ef7287cdd69
Signed-off-by: Shahar Hochma <shaharhoch@gmail.com>
---
M src/FSAL/FSAL_PSEUDO/handle.c
M src/Protocols/NFS/nfs4_pseudo.c
2 files changed, 15 insertions(+), 39 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/91/556291/1
To view, visit change 556291. To unsubscribe, or for help writing mail filters, visit settings.