When we get an RDMA_CM_EVENT_DEVICE_REMOVAL the cm_thread will exit and because flush errors are ignored the cb->sem may not get signaled. So just signal on device removal event. v1 -> v2: Add Fixes tag Fixes: 612eae1f6fe3 ("rping: ignore flushed completions") Signed-off-by: Mustafa Ismail <mustafa.ismail@xxxxxxxxx> --- librdmacm/examples/rping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c index ad38f6d..53c1525 100644 --- a/librdmacm/examples/rping.c +++ b/librdmacm/examples/rping.c @@ -224,6 +224,8 @@ static int rping_cma_event_handler(struct rdma_cm_id *cma_id, case RDMA_CM_EVENT_DEVICE_REMOVAL: fprintf(stderr, "cma detected device removal!!!!\n"); + cb->state = ERROR; + sem_post(&cb->sem); ret = -1; break; -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html