diff options
author | Soumya Koduri <skoduri@redhat.com> | 2015-06-25 19:49:59 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-06-27 02:55:19 -0700 |
commit | 0cde678bd1b77839339a6b3fd6947ef99531c450 (patch) | |
tree | 05c9f0b55cefc36335c4417701480759c7803692 /xlators/protocol/server/src | |
parent | 00df024959b3f47b7027d51a5f182b108a4e501f (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.
This is a backport of the below fix -
http://review.gluster.org/#/c/11411/
BUG: 1236274
Change-Id: I00b9a140d6ee76e44c49146e90c20b3a87dc2de8
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/11411
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11441
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r-- | xlators/protocol/server/src/server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index ca00dc09133..55b30180032 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1159,7 +1159,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, |