>From Gui Hecheng <[email protected]>:

Gui Hecheng has uploaded a new change for review.

  https://review.gerrithub.io/301534

Change subject: FSAL: fix segfault while adding export for a non-exist 
subdirectory
......................................................................

FSAL: fix segfault while adding export for a non-exist subdirectory

When I try to add export for a non-exist subdirectory using FSAL_VFS:
        # ganesha_mgr add_export ext4_subdir.conf "EXPORT(Export_ID=1)"
It kills ganesha.nfsd daemon with a segfault.

It is because the resolve_posix_filesystem() will try to call
claim_posix_filesystems() again on error code ENOENT which is
expected when the init procedure is not completed.

But if the subdirectory for exporting does not even exist
claim_posix_filesystems() will return the errno of stat()
which happens to be ENOENT. On such condition, we could just
give up retrying and bale out.

So to fix it, we could change the flag ENOENT for init
incomplete case to EAGAIN which fits the retry semantics well.

Change-Id: I52e74022b3296144bbdc942fbc9935dd49e8b02f
Signed-off-by: Gui Hecheng <[email protected]>
---
M src/FSAL/commonlib.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha 
refs/changes/34/301534/1
-- 
To view, visit https://review.gerrithub.io/301534
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52e74022b3296144bbdc942fbc9935dd49e8b02f
Gerrit-PatchSet: 1
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Owner: Gui Hecheng <[email protected]>

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to