diff options
author | Kotresh H R <khiremat@redhat.com> | 2014-06-11 14:18:02 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2014-06-12 00:24:13 -0700 |
commit | afeaab53f6ca450a3147a6230906a83ee1bebe5a (patch) | |
tree | 2592ce687067c5cdaa8bd19aabb44befdc8fa52b /xlators/mgmt/glusterd/src/glusterd-geo-rep.c | |
parent | ee1ef00e2aee6f25b75d156c24ce7f5aab4529a4 (diff) |
geo-rep/glusterd: Fix glusterd crash during geo-rep config reset.
Problem:
When "\!<config-option>" (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 <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8032
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-geo-rep.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |