>From Gui Hecheng <[email protected]>: Gui Hecheng has uploaded a new change for review.
https://review.gerrithub.io/303718 Change subject: FSAL_RGW: fix segfault on missing free of root handle ...................................................................... FSAL_RGW: fix segfault on missing free of root handle When I run: # systemctl start nfs-ganesha # ganesha_mgr add_export rgw.conf "EXPORT(Export_ID=1)" # systemctl stop nfs-ganesha I got segfault and the following trace: shutdown_handles :FSAL :DEBUG :Extra file handles shutdown_handles :FSAL :DEBUG :Releasing handle (segfault here) As I found, fsal_rgw constructs an extra handle on root if we are export the '/' directory. But the extra handle is not freed in export release, then we get into the extra handle release path after export release(here rgw_fs is already NULL), so we get segfault. To Fix it, we could record the root handle, and release it upon export releasing with a new function deconstruct_handle(). Change-Id: I31f4ca9598b9a50dde49739b91e6cf1258a64775 Signed-off-by: Gui Hecheng <[email protected]> --- M src/FSAL/FSAL_RGW/export.c M src/FSAL/FSAL_RGW/handle.c M src/FSAL/FSAL_RGW/internal.c M src/FSAL/FSAL_RGW/internal.h M src/FSAL/FSAL_RGW/main.c 5 files changed, 12 insertions(+), 4 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/18/303718/1 -- To view, visit https://review.gerrithub.io/303718 To unsubscribe, visit https://review.gerrithub.io/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31f4ca9598b9a50dde49739b91e6cf1258a64775 Gerrit-PatchSet: 1 Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Owner: Gui Hecheng <[email protected]> ------------------------------------------------------------------------------ _______________________________________________ Nfs-ganesha-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
