]> git.openfabrics.org - ~shefty/rdma-win.git/commit
[DAPL2]
authorStan Smith <stan.smith@intel.com>
Tue, 26 Jan 2010 20:31:36 +0000 (20:31 +0000)
committerStan Smith <stan.smith@intel.com>
Tue, 26 Jan 2010 20:31:36 +0000 (20:31 +0000)
commit8be9a2a63de9c896f7da0e18beaee9f7861e5196
tree5026cb476679746a76621199397fb5dac6edffbb
parent8ea306b2076235b5c19798dc4df6ca26997e3c26
[DAPL2]
libibverbs/device: destroy completion channel when closing device
ibv_close_device should destroy the completion channel
when closing the device and freeing the memory.
 trunk/ulp/libibverbs/src/device.cpp

dapl: move close device after async thread is done using it
Before calling ibv_close_device, wait for the asynchronous
processing thread to finish using the device.  This prevents a use after free error.
 trunk/ulp/dapl2/dapl/openib_cma/device.c
 trunk/ulp/dapl2/dapl/openib_scm/device.c

librdmacm: set private_data_len
Set the private_data_len for reported events.  This allows DAPL to use the value when copying private data.
 trunk/ulp/librdmacm/include/rdma/rdma_cma.h
 trunk/ulp/librdmacm/src/cma.cpp

dapl: quick fix for wrong private data size
DAPL expects the private data size to be up to 256 bytes, but
on windows the private data size is limited to 56 bytes.  As
a result, DAPL can access memory beyond the end of what's
allocated.
A more 'correct' fix is being submitted upstream to dapl.  This
is a simpler fix for the Windows 2.2 release only.
 trunk/ulp/dapl2/dapl/openib_cma/cm.c

dapl/cma: fix referencing freed address
DAPL uses a pointer to reference the local and remote addresses
of an endpoint.  It expects that those addresses are located
in memory that is always accessible.  Typically, for the local
address, the pointer references the address stored with the DAPL
HCA device.  However, for the cma provider, it changes this pointer
to reference the address stored with the rdma_cm_id.

This causes a problem when that endpoint is connected on the
passive side of a connection.  When connect requests are given
to DAPL, a new rdma_cm_id is associated with the request.  The
DAPL code replaces the current rdma_cm_id associated with a
user's endpoint with the new rdma_cm_id.  The old rdma_cm_id is
then deleted.  But the endpoint's local address pointer still
references the address stored with the old rdma_cm_id.  The
result is that any reference to the address will access freed
memory.
Fix this by keeping the local address pointer always pointing
to the address associated with the DAPL HCA device.  This is about
the best that can be done given the DAPL interface design.
 trunk/ulp/dapl2/dapl/openib_common/qp.c

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2684 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86
branches/WOF2-2/ulp/dapl2/dapl/openib_cma/cm.c
branches/WOF2-2/ulp/dapl2/dapl/openib_cma/device.c
branches/WOF2-2/ulp/dapl2/dapl/openib_common/qp.c
branches/WOF2-2/ulp/dapl2/dapl/openib_scm/device.c
branches/WOF2-2/ulp/libibverbs/src/device.cpp
branches/WOF2-2/ulp/librdmacm/include/rdma/rdma_cma.h
branches/WOF2-2/ulp/librdmacm/src/cma.cpp