summaryrefslogtreecommitdiffstats
path: root/transport
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-07-09 23:59:26 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-15 23:15:04 -0700
commit22c076cadc04e15aa84f86bca621d38fbf111932 (patch)
tree349fcd83953639be24af5aee3dbeaec465cf87e5 /transport
parent359e87e72fcfc30909b0131a5e559466713245ed (diff)
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 <avati@dev.gluster.com> 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
Diffstat (limited to 'transport')
-rw-r--r--transport/ib-verbs/src/ib-verbs.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}