cluster: RHEL56 - cman: Clean shutdown_con if the controlling process is killed.
Fabio M. Di Nitto
fabbione at fedoraproject.org
Mon Feb 27 14:56:40 UTC 2012
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1671c39acedc665dc827165d0aa0a1c696c2da8f
Commit: 1671c39acedc665dc827165d0aa0a1c696c2da8f
Parent: 36fd94d68003389d9585c87a649726742e06badd
Author: Christine Caulfield <ccaulfie at redhat.com>
AuthorDate: Fri Sep 19 13:02:40 2008 +0100
Committer: Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Mon Feb 27 15:54:57 2012 +0100
cman: Clean shutdown_con if the controlling process is killed.
If a shutdown is initiated by a process that is then killed, the
shutdown_con isn't cleared. So if another process replies to the
shutdown request cman could segfault.
Resolves: rhbz#795814
Signed-off-by: Christine Caulfield <ccaulfie at redhat.com>
Signed-off-by: Fabio M. Di Nitto <fdintto at redhat.com>
---
cman/daemon/commands.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index 6ffe9e5..781e564 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1482,6 +1482,11 @@ void unbind_con(struct connection *con)
check_shutdown_status();
}
+
+ /* If the controlling shutdown process has quit, then cancel the
+ shutdown session */
+ if (con == shutdown_con)
+ shutdown_con = NULL;
}
/* Post a PORT OPEN/CLOSE event to anyone listening on this end */
More information about the cluster-commits
mailing list