Commit 60cbd3c5 authored by Kenneth Raffenetti's avatar Kenneth Raffenetti Committed by Antonio J. Pena
Browse files

portals4: invalidate ME handle before request dequeue



Invalidate the handle of an ME that has been matched and handled in
the portals4 netmod *before* dequeuing the request. The prevents
potential double unlinking failures.
Signed-off-by: default avatarAntonio J. Pena <apenya@mcs.anl.gov>
parent 051449e7
......@@ -16,6 +16,10 @@ static void dequeue_req(const ptl_event_t *e)
MPID_Request *const rreq = e->user_ptr;
int s_len, r_len;
/* At this point we know the ME is unlinked. Invalidate the handle to
prevent further accesses, e.g. an attempted cancel. */
REQ_PTL(rreq)->me = PTL_INVALID_HANDLE;
found = MPIDI_CH3U_Recvq_DP(rreq);
MPIU_Assert(found);
......@@ -23,10 +27,6 @@ static void dequeue_req(const ptl_event_t *e)
rreq->status.MPI_SOURCE = NPTL_MATCH_GET_RANK(e->match_bits);
rreq->status.MPI_TAG = NPTL_MATCH_GET_TAG(e->match_bits);
/* At this point we know the ME is unlinked. Invalidate the handle to
prevent further accesses, e.g. an attempted cancel. */
REQ_PTL(rreq)->me = PTL_INVALID_HANDLE;
MPID_Datatype_get_size_macro(rreq->dev.datatype, r_len);
r_len *= rreq->dev.user_count;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment