1
0
Fork 0
alistair23-linux/drivers/infiniband/core
Sean Hefty c5483388bb RDMA/cma: Add locking around QP accesses
If a user allocates a QP on an rdma_cm_id, the rdma_cm will automatically
transition the QP through its states (RTR, RTS, error, etc.)  While the
QP state transitions are occurring, the QP itself must remain valid.
Provide locking around the QP pointer to prevent its destruction while
accessing the pointer.

This fixes an issue reported by Olaf Kirch from Oracle that resulted in
a system crash:

"An incoming connection arrives and we decide to tear down the nascent
 connection.  The remote ends decides to do the same.  We start to shut
 down the connection, and call rdma_destroy_qp on our cm_id. ... Now
 apparently a 'connect reject' message comes in from the other host,
 and cma_ib_handler() is called with an event of IB_CM_REJ_RECEIVED.
 It calls cma_modify_qp_err, which for some odd reason tries to modify
 the exact same QP we just destroyed."

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-16 12:25:00 -07:00
..
Makefile IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
addr.c RDMA/cma: Use neigh_event_send() to start neighbour discovery 2007-10-09 19:59:13 -07:00
agent.c IB/mad: agent_send_response() should be void 2007-08-03 10:45:17 -07:00
agent.h IB/mad: agent_send_response() should be void 2007-08-03 10:45:17 -07:00
cache.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
cm.c IB/cm: Modify interface to send MRAs in response to duplicate messages 2007-10-09 19:59:17 -07:00
cm_msgs.h IB/cm: cm_msgs.h should include ib_cm.h 2007-07-10 21:50:53 -07:00
cma.c RDMA/cma: Add locking around QP accesses 2007-10-16 12:25:00 -07:00
core_priv.h [PATCH] IB: move include files to include/rdma 2005-08-26 20:37:38 -07:00
device.c IB: find_first_zero_bit() takes unsigned pointer 2007-10-09 19:59:04 -07:00
fmr_pool.c IB/fmr_pool: Clean up some error messages in fmr_pool.c 2007-10-09 19:59:05 -07:00
iwcm.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
iwcm.h RDMA: iWARP Connection Manager. 2006-09-22 15:22:46 -07:00
mad.c IB/mad: Fix memory leak in switch handling in ib_mad_recv_done_handler() 2007-08-03 10:45:17 -07:00
mad_priv.h PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
mad_rmpp.c IB/mad: Fix address handle leak in mad_rmpp 2007-08-03 10:45:17 -07: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
multicast.c IB/core: Fix handling of multicast response failures 2007-10-09 19:59:14 -07:00
packer.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
sa.h IB: Remove garbage non-ASCII characters from comments 2007-07-09 16:17:32 -07:00
sa_query.c IB/sa: Add new QoS fields to path record 2007-10-09 19:59:12 -07:00
smi.c IB/mad: Enhance SMI for switch support 2007-07-09 16:17:32 -07:00
smi.h IB/mad: Enhance SMI for switch support 2007-07-09 16:17:32 -07:00
sysfs.c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ucm.c IB/cm: Include HCA ACK delay in local ACK timeout 2007-07-10 21:50:05 -07:00
ucma.c RDMA/ucma: Allow user space to set service type 2007-10-09 19:59:12 -07:00
ud_header.c [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
umem.c IB/umem: Add hugetlb flag to struct ib_umem 2007-10-09 19:59:13 -07:00
user_mad.c IB/umad: Fix bit ordering and 32-on-64 problems on big endian systems 2007-10-09 19:59:15 -07:00
uverbs.h IB/uverbs: Make ib_uverbs_release_event_file() static 2007-10-09 19:59:15 -07:00
uverbs_cmd.c IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules 2007-05-08 18:00:37 -07:00
uverbs_main.c IB/uverbs: Make ib_uverbs_release_event_file() static 2007-10-09 19:59:15 -07:00
uverbs_marshall.c RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
verbs.c IB: Add CQ comp_vector support 2007-05-06 21:18:11 -07:00