From 22c076cadc04e15aa84f86bca621d38fbf111932 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 9 Jul 2009 23:59:26 +0000 Subject: ib-verbs: don't append ioq_entry to pending_list if first attempt of writing to network fails * fix to bug #101 - When a buffer bigger than ib-verbs-work-request-send-size was attempted to write to network, ib-verbs returns ENOTCONN. Neverthless, the ioq_entry corresponding to the write was appended to the pending lists of ioq_entries waiting to be written to network. This resulted in double free of header, once in protocol_client_xfer and again during cleanup of transport. The transport cleanup happened due to the timeouts of subsequent operations, since ioq_entry corresponding to writev was blocking any other operations from reaching server. Signed-off-by: Anand V. Avati BUG: 101 (ib-verbs config crashing while dd'ing with a big mtu size) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=101 --- transport/ib-verbs/src/ib-verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'transport') diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index 6b51232849a..469287489a2 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -397,7 +397,7 @@ ib_verbs_writev (transport_t *this, peer = &priv->peer; if (list_empty (&peer->ioq)) { ret = __ib_verbs_ioq_churn_entry (peer, entry); - if (ret > 0) { + if (ret != 0) { need_append = 0; } } -- cgit