From 7e9e9e8fd8d883524cf96585897072b4449cb190 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 21 Oct 2009 07:50:19 -0700 Subject: [PATCH] librdmacm: initialize correct pthread condition in rdma_join_multicast rdma_join_multicast re-initializes id_priv->cond rather than mc->cond. Fix this. Bug reported by Nir Naaman. Signed-off-by: Sean Hefty --- src/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cma.c b/src/cma.c index 87e73ac9..e4bc8d63 100644 --- a/src/cma.c +++ b/src/cma.c @@ -1044,7 +1044,7 @@ int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr, mc->context = context; mc->id_priv = id_priv; memcpy(&mc->addr, addr, addrlen); - if (pthread_cond_init(&id_priv->cond, NULL)) { + if (pthread_cond_init(&mc->cond, NULL)) { ret = -1; goto err1; } -- 2.41.0