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
..
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
agent.h
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
cma.c RDMA/iwcm: iWARP connection timeouts shouldn't be reported as rejects 2007-01-07 20:15:58 -08:00
core_priv.h
device.c
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
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
Makefile RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
packer.c
sa_query.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
smi.c
smi.h
sysfs.c
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
user_mad.c
uverbs.h
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