FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default qdiskd: avoid a potential crash in case config state is invalid

Spotted by Coverify Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 d21c209... 079af01... M cman/qdisk/main.c
cman/qdisk/main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index d21c209..079af01 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -73,6 +73,7 @@ static void update_local_status(qd_ctx *ctx, node_info_t *ni, int max, int score
static int get_config_data(qd_ctx *ctx, struct h_data *h, int maxh, int *cfh);
static int cman_wait(cman_handle_t ch, struct timeval *_tv);

+static int fake_cfh = 0;

static void
int_handler(int sig)
@@ -934,7 +935,7 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
_cman_shutdown = 1;
break;
case CMAN_REASON_CONFIG_UPDATE:
- get_config_data(ctx, NULL, 0, NULL);
+ get_config_data(ctx, NULL, 0, &fake_cfh);
break;
case CMAN_REASON_PORTCLOSED:
break;
@@ -978,7 +979,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
_running = 1;
while (_running) {
if (_reconfig) {
- get_config_data(ctx, NULL, 0, NULL);
+ get_config_data(ctx, NULL, 0, &fake_cfh);
_reconfig = 0;
}

--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 07:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org