linux/drivers/infiniband/core
Sean Hefty 0cefcf0bbc RDMA/ucma: Don't report events with invalid user context
There's a problem with how rdma cm events are reported to userspace
that can lead to application crashes.

When a new connection request arrives, a context for the connection is
allocated in the kernel.  The connection event is then reported to
userspace.  The userspace library retrieves the event and allocates
its own context for the connection.  The userspace context is
associated with the kernel's context when accepting.  This allows the
kernel to give userspace context with other events.

A problem occurs if a second event for the same connection occurs
before the user has had a chance to call accept.  The userspace
context has not yet been set, which causes the librdmacm to crash.
(This has been seen when the app takes too long to call accept,
resulting in the remote side timing out and rejecting the connection)

Fix this by ignoring events for new connections until userspace has
set their context.  This can only happen if an error occurs on a new
connection before the user accepts it.  This is okay, since the accept
will just fail later.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-01-07 20:20:08 -08:00
..
Makefile RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
addr.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
agent.c IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp() 2006-03-20 10:08:11 -08:00
agent.h [PATCH] missing include in infiniband 2005-10-29 10:35:07 -07:00
cache.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
cm.c RDMA/cma: Allow early transition to RTS to handle lost CM messages 2006-12-12 11:50:21 -08:00
cm_msgs.h [IB] cm: Add missing break in switch 2005-10-20 12:29:36 -07:00
cma.c RDMA/iwcm: iWARP connection timeouts shouldn't be reported as rejects 2007-01-07 20:15:58 -08:00
core_priv.h [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
device.c IB: Fix typo in kerneldoc for ib_set_client_data() 2006-09-22 15:22:58 -07:00
fmr_pool.c IB/fmr: ib_flush_fmr_pool() may wait too long 2006-12-12 11:50:19 -08:00
iwcm.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
iwcm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
mad.c IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
mad_priv.h IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
mad_rmpp.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
mad_rmpp.h [IB] Fix MAD layer DMA mappings to avoid touching data buffer once mapped 2005-10-25 10:51:39 -07:00
packer.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
sa_query.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
smi.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
smi.h IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp() 2006-03-20 10:08:11 -08:00
sysfs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
ucm.c IB/ucm: Fix deadlock in cleanup 2006-11-29 15:33:10 -08:00
ucma.c RDMA/ucma: Don't report events with invalid user context 2007-01-07 20:20:08 -08:00
ud_header.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
user_mad.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00
uverbs.h IB/uverbs: Avoid a crash on device hot remove 2006-08-03 10:56:42 -07:00
uverbs_cmd.c IB/uverbs: Return sq_draining value in query_qp response 2006-10-30 21:19:35 -08:00
uverbs_main.c [PATCH] struct path: convert infiniband 2006-12-08 08:28:46 -08:00
uverbs_marshall.c RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
uverbs_mem.c IB/core: Use the new verbs DMA mapping functions 2006-12-12 14:28:30 -08:00
verbs.c RDMA: iWARP Core Changes. 2006-09-22 15:22:47 -07:00