From 0cf1c851b9fc6b98b5839b32ef7e3ff38d87f3c3 Mon Sep 17 00:00:00 2001 From: Nithya Balachandran Date: Tue, 15 Sep 2015 16:07:32 +0530 Subject: cluster/tier: Fixed a crash in tiering An incorrect check was causing the arguments to the promote thread to be cleared before the thread was done with them. This caused the process to crash when it tried to dereference a NULL pointer. Change-Id: I8348309ef4dad33b7f648c7a2c2703487e401269 BUG: 1263204 Signed-off-by: Nithya Balachandran Reviewed-on: http://review.gluster.org/12179 Tested-by: NetBSD Build System Reviewed-by: Dan Lambright Reviewed-by: Joseph Fernandes --- xlators/cluster/dht/src/tier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index c86eb4f5514..a6199173688 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -957,7 +957,7 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag) } } - if (is_promotion_triggered && (ret_demotion == 0)) { + if (ret_demotion == 0) { pthread_join (demote_thread, NULL); if (demotion_args.return_value) { gf_msg (this->name, GF_LOG_ERROR, 0, @@ -967,7 +967,7 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag) ret_demotion = demotion_args.return_value; } - if (is_demotion_triggered && (ret_promotion == 0)) { + if (ret_promotion == 0) { pthread_join (promote_thread, NULL); if (promotion_args.return_value) { gf_msg (this->name, GF_LOG_ERROR, 0, -- cgit