summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-03-12 01:08:34 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-12 05:10:39 -0800
commitc549807c23d6915c69a96d9b86af53605c94bc1b (patch)
tree0a72ee0573d6ddb7a00a666a2c73dc113f511f5d
parentcacb35dcf70fa481a3f39ecfef1b5c46d6a174fd (diff)
rpc-transport/rdma: handle cases where peer is NULL in send_completion.v3.1.3qa8
- There can be valid cases where peer is NULL - For eg., race b/w pollin received on handshake socket and as a result transport getting disconnected and handling of a send/recv completion on the same qp for some previous read/write - in send/recv_completion_process. Hence we should be checking for a valid peer pointer before accessing it. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2514 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2514
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 8084a86e9..633f57db5 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -3463,7 +3463,7 @@ rdma_handle_successful_send_completion (rdma_peer_t *peer, struct ibv_wc *wc)
}
ret = rdma_pollin_notify (peer, post);
- if (ret == -1) {
+ if ((ret == -1) && (peer != NULL)) {
rpc_transport_disconnect (peer->trans);
}