diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-01-21 23:41:07 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-03-05 21:26:59 -0800 |
commit | d6c1468b2779b6247e44b75276436021a3469a59 (patch) | |
tree | 08e3e240c4b40f980b2fa375b19592f632bacfbf /rpc/rpc-lib/src/rpc-clnt.h | |
parent | 9f45d0f6212d6d5c96dafc4aba73d9d12b39c3d6 (diff) |
rpc: transport may be destroyed while rpc isn't
rpc_clnt object is destroyed after the corresponding transport object is
destroyed. But rpc_clnt_reconnect, a timer driven function, refers to
the transport object beyond its 'life'. Instead, using the embedded
connection object prevents use after free problem wrt transport object.
Also, access transport object under conn->lock.
Change-Id: Iae28e8a657d02689963c510114ad7cb7e6764e62
BUG: 962619
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6751
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.h')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h index 2596c3508c2..bd4820605d8 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -144,6 +144,7 @@ struct rpc_clnt_connection { struct timeval last_sent; struct timeval last_received; int32_t ping_started; + char *name; }; typedef struct rpc_clnt_connection rpc_clnt_connection_t; |