summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-09-03 15:18:26 -0700
committergluster-ant <bugzilla-bot@gluster.org>2013-09-03 15:18:26 -0700
commit7d342aaeaa5e3c8ed5dc857d2a3d23359ba8389a (patch)
treeb77ef9b8ba8e9023d9088cc6e9e40a0a3c06df7f
parent446fe9cb1390ae6dd3769dbc7bc36d2bcc2fa7d3 (diff)
downloadglusterfs-7d342aaeaa5e3c8ed5dc857d2a3d23359ba8389a.tar.gz
glusterfs-7d342aaeaa5e3c8ed5dc857d2a3d23359ba8389a.tar.xz
glusterfs-7d342aaeaa5e3c8ed5dc857d2a3d23359ba8389a.zip
glusterfs, gfapi: fix symbol clash
The callback structures in both protocol/client and glusterfsd, gfapi used the same name for the actor table - gluster_cbk_actors. CBKs are required only for the management connection, and the actors of protocol/client are NOP functions. This supposed-to-be NOP function dispatch tabble is actually ending up pointing to the actor table of glusterfsd or gfapi. These functions, even though set wrongly, are not even expected to be called through the protocol/client callback path. Glusterd however sends the FETCHSPEC (and other) notify callbacks to *all* connected clients unconditionally, and there is a small period of time when protocol/client is connected to glusterd for PORTMAP query. If the FETCHSPEC callback notify is issued in this window of time, we end up calling the wrong actor in the client side resulting in a crash. Change-Id: I605ff7df64c7faf4607369bbf275aedec28e1778 BUG: 1004091 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5767 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
-rw-r--r--api/src/glfs-mgmt.c4
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index 925029d5c1..20362543e6 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -114,7 +114,7 @@ mgmt_cbk_event (struct rpc_clnt *rpc, void *mydata, void *data)
}
-rpcclnt_cb_actor_t gluster_cbk_actors[] = {
+rpcclnt_cb_actor_t mgmt_cbk_actors[] = {
[GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, mgmt_cbk_spec },
[GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_CBK_EVENT_NOTIFY,
mgmt_cbk_event},
@@ -125,7 +125,7 @@ struct rpcclnt_cb_program mgmt_cbk_prog = {
.progname = "GlusterFS Callback",
.prognum = GLUSTER_CBK_PROGRAM,
.progver = GLUSTER_CBK_VERSION,
- .actors = gluster_cbk_actors,
+ .actors = mgmt_cbk_actors,
.numactors = GF_CBK_MAXVALUE,
};
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index e26bf5a2ff..4b9b82fff8 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -1200,7 +1200,7 @@ glusterfs_handle_rpc_msg (rpcsvc_request_t *req)
return ret;
}
-rpcclnt_cb_actor_t gluster_cbk_actors[] = {
+rpcclnt_cb_actor_t mgmt_cbk_actors[] = {
[GF_CBK_FETCHSPEC] = {"FETCHSPEC", GF_CBK_FETCHSPEC, mgmt_cbk_spec },
[GF_CBK_EVENT_NOTIFY] = {"EVENTNOTIFY", GF_CBK_EVENT_NOTIFY,
mgmt_cbk_event},
@@ -1211,7 +1211,7 @@ struct rpcclnt_cb_program mgmt_cbk_prog = {
.progname = "GlusterFS Callback",
.prognum = GLUSTER_CBK_PROGRAM,
.progver = GLUSTER_CBK_VERSION,
- .actors = gluster_cbk_actors,
+ .actors = mgmt_cbk_actors,
.numactors = GF_CBK_MAXVALUE,
};