Revision: 2302
Author:
regra...@gmail.com
Date: Thu Apr 23 17:02:40 2015 UTC
Log: Reject incoming connections that may happen when attempting to
finalize in a friendlier manner
* This should not happen in normal code paths, but some eager to finalize
code may not wait for all acks, or even RDMA ops to finish (which is
incorrect behaviour)
* Thanks to Antonio P. at ANL for this patch.
https://code.google.com/p/portals4/source/detail?r=2302
Modified:
/trunk/src/ib/ptl_conn.c
/trunk/src/ib/ptl_conn.h
=======================================
--- /trunk/src/ib/ptl_conn.c Wed Oct 2 21:26:45 2013 UTC
+++ /trunk/src/ib/ptl_conn.c Thu Apr 23 17:02:40 2015 UTC
@@ -583,7 +583,10 @@
case CONN_STATE_DISCONNECTING:
/* Not sure how to handle that case. Ignore and disconnect
* anyway? */
- abort();
+ rej.reason = REJECT_REASON_DISCONNECTING;
+ pthread_mutex_unlock(&conn->mutex);
+ conn_put(conn);
+ goto reject;
break;
case CONN_STATE_RESOLVING_ADDR:
=======================================
--- /trunk/src/ib/ptl_conn.h Wed Oct 2 21:26:45 2013 UTC
+++ /trunk/src/ib/ptl_conn.h Thu Apr 23 17:02:40 2015 UTC
@@ -234,6 +234,7 @@
REJECT_REASON_BAD_PARAM, /* request parm is invalid */
REJECT_REASON_CONNECTED, /* already connected */
REJECT_REASON_CONNECTING, /* already connected */
+ REJECT_REASON_DISCONNECTING, /* already disconnecting */
REJECT_REASON_ERROR, /* something unexpected happened;
catch all */
};