From afeaab53f6ca450a3147a6230906a83ee1bebe5a Mon Sep 17 00:00:00 2001 From: Kotresh H R Date: Wed, 11 Jun 2014 14:18:02 +0530 Subject: geo-rep/glusterd: Fix glusterd crash during geo-rep config reset. Problem: When "\!" (i.e., reset) is used in geo-rep config, glusterd crashes with NULL pointer dereference of 'op_value' in glusterd_gsync_op_already_set. Solution: glusterd_gsync_op_already_set should be called only for geo-rep set option. So bypass glusterd_gsync_op_already_set for reset. Change-Id: I9d8ef242abf02011139d76a72564f66d68cc8585 BUG: 1107984 Signed-off-by: Kotresh H R Reviewed-on: http://review.gluster.org/8032 Reviewed-by: Avra Sengupta Tested-by: Gluster Build System Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 51496606e2d..af47c2a8452 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -3085,7 +3085,7 @@ glusterd_gsync_configure (glusterd_volinfo_t *volinfo, char *slave, if (op_value) runner_add_arg (&runner, op_value); - if ( strcmp(op_name,"checkpoint") != 0 ) { + if ( strcmp(op_name,"checkpoint") != 0 && strtail (subop, "set")) { ret = glusterd_gsync_op_already_set(master,slave,conf_path, op_name,op_value); if (ret == -1) { -- cgit