diff options
Diffstat (limited to 'glusterfsd/src')
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 9ee88b6d57b..8d3c71e8988 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -1642,6 +1642,16 @@ cleanup_and_exit(int signum)  #endif          trav = NULL; + +        /* previously we were releasing the cleanup mutex lock before the +           process exit. As we are releasing the cleanup mutex lock, before +           the process can exit some other thread which is blocked on +           cleanup mutex lock is acquiring the cleanup mutex lock and +           trying to acquire some resources which are already freed as a +           part of cleanup. To avoid this, we are exiting the process without +           releasing the cleanup mutex lock. This will not cause any lock +           related issues as the process which acquired the lock is going down +         */          /* NOTE: Only the least significant 8 bits i.e (signum & 255)             will be available to parent process on calling exit() */          exit(abs(signum));  | 
