From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13694 invoked by alias); 19 Sep 2008 12:06:43 -0000 Received: (qmail 13688 invoked by alias); 19 Sep 2008 12:06:43 -0000 X-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_40,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: STABLE2 - cman: Clean shutdown_con if the controlling process is killed. To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE2 X-Git-Reftype: branch X-Git-Oldrev: 04b532e83dd7fef23daf1ba89677a09c18fbca49 X-Git-Newrev: 5c0eeefffe2ef260383ae0287cb82bfdd3a38a70 From: Christine Caulfield Message-Id: <20080919120519.0F8D7C07B7@lists.fedorahosted.org> Date: Fri, 19 Sep 2008 15:43:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00471.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5c0eeefffe2ef260383ae0287cb82bfdd3a38a70 Commit: 5c0eeefffe2ef260383ae0287cb82bfdd3a38a70 Parent: 04b532e83dd7fef23daf1ba89677a09c18fbca49 Author: Christine Caulfield AuthorDate: Fri Sep 19 13:02:40 2008 +0100 Committer: Christine Caulfield CommitterDate: Fri Sep 19 13:04:33 2008 +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. Signed-off-by: Christine Caulfield --- 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 162e8be..519a10d 100644 --- a/cman/daemon/commands.c +++ b/cman/daemon/commands.c @@ -1450,6 +1450,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 */