File: 0003-fix-fsal_obj_handle_fine-position-in-FSAL_GLUSTER.patch

package info (click to toggle)
nfs-ganesha 6.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,948 kB
  • sloc: ansic: 166,056; cpp: 8,360; perl: 5,828; python: 4,927; sh: 2,777; lex: 764; yacc: 414; makefile: 102; awk: 22; lisp: 20
file content (30 lines) | stat: -rw-r--r-- 1,030 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
commit 72565026ac69d40c586b9adc447339aea5eeeaff
Author: Guillaume PENIN <guillaume@onlineacid.com>
Date:   Tue Mar 11 18:35:14 2025 +0100

    Move fsal_obj_handle_fini() just before gsh_free() in FSAL_GLUSTER handle_release() to prevent SIGSEGV.
    
    Change-Id: I21bff9de535251755b5b1f2893ed92c71f72b9ff
    Signed-off-by: Guillaume PENIN <guillaume@onlineacid.com>

diff --git a/src/FSAL/FSAL_GLUSTER/handle.c b/src/FSAL/FSAL_GLUSTER/handle.c
index 93bab059f..8724af1fa 100644
--- a/src/FSAL/FSAL_GLUSTER/handle.c
+++ b/src/FSAL/FSAL_GLUSTER/handle.c
@@ -64,8 +64,6 @@ static void handle_release(struct fsal_obj_handle *obj_hdl)
 	now(&s_time);
 #endif
 
-	fsal_obj_handle_fini(&objhandle->handle, true);
-
 	if (obj_hdl->type == REGULAR_FILE) {
 		fsal_status_t st;
 
@@ -97,6 +95,7 @@ static void handle_release(struct fsal_obj_handle *obj_hdl)
 	if (objhandle->handle.type == REGULAR_FILE)
 		destroy_fsal_fd(&my_fd->fsal_fd);
 
+	fsal_obj_handle_fini(&objhandle->handle, true);
 	gsh_free(objhandle);
 
 #ifdef GLTIMING