Skip to content

Commit

Permalink
UCP/EAGER: Check ep_ptr for incoming messages
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefe committed Apr 26, 2020
1 parent fad0d55 commit 77666d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ucp/tag/eager_rcv.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ ucp_eager_tagged_handler(void *arg, void *data, size_t length, unsigned am_flags
ucs_assert(length >= hdr_len);
ucs_assert(flags & UCP_RECV_DESC_FLAG_EAGER);

if (ucp_worker_get_ep_by_ptr(worker, eager_hdr->ep_ptr) == NULL) {
return UCS_OK;
}

recv_tag = eager_hdr->super.tag;
recv_len = length - hdr_len;

Expand Down Expand Up @@ -164,6 +168,10 @@ ucp_eager_common_middle_handler(ucp_worker_t *worker, void *data, size_t length,
khiter_t iter;
int ret;

if (ucp_worker_get_ep_by_ptr(worker, hdr->ep_ptr) == NULL) {
return UCS_OK;
}

iter = kh_put(ucp_tag_frag_hash, &worker->tm.frag_hash, hdr->msg_id, &ret);
ucs_assert(ret >= 0);
matchq = &kh_value(&worker->tm.frag_hash, iter);
Expand Down

0 comments on commit 77666d1

Please sign in to comment.