summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-06-25 19:49:59 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-06-26 18:14:57 -0700
commit14cf2bbe77fbbaee8ee3211ec841a4f1ef3a8380 (patch)
treed4d25f3a6f425037f5c901940201e71c39655421
parent35d24f0c967130ef8424660b5f6dfd182bb305c1 (diff)
protocol/server: Include a check to validate xprt->client
rpc_transport entries(xprt) are added to the conf->xprt_list during client connection with the server. But the client object is created and assigned to that transport object only during GF_HANDSK_SETVOLUME. Hence till that period, there could be xprt entries in the xprt_list without client associated with it. Added a check to validate the client object during upcall notify. Change-Id: I11e2fcd8b0a67e35302ede478b777b72d1973456 BUG: 1235542 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11411 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--xlators/protocol/server/src/server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index eed1d254a1d..dbafd8367c0 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1154,7 +1154,9 @@ server_process_event_upcall (xlator_t *this, void *data)
list_for_each_entry (xprt, &conf->xprt_list, list) {
client = xprt->xl_private;
- if (strcmp(client->client_uid, client_uid))
+ /* 'client' is not atomically added during xprt entry
+ * addition to the list. */
+ if (!client || strcmp(client->client_uid, client_uid))
continue;
rpcsvc_request_submit(conf->rpc, xprt,