Bug #1714: Fix crash at deregistration in OFI RDMA Entry Method API
The crash was occuring intermittently for SMP and "--with-production"
version of examples/zerocopy/pingpong. The race condition arose because
the deregistration code was using a data structure that was a part of
the initial charm message allocated in ckrdma.C. Since the call to the
converse message handler was before the deregistration, there was a
possibility of the worker thread executing the entry method using the
charm message and later deallocating the message before the deregistration.
This caused a segfault while accessing the deallocated data structure in
the deregistration code. The fix was to remove the dependency on the charm
message and store the required field in a stack variable to access it during
deregistration.
Change-Id: I29e0fcb04f0ae1450b13d630adb0859938bd27d4