linux/drivers/infiniband/hw/cxgb4
Steve Wise cc18b939e1 RDMA/cxgb4: Fix endpoint mutex deadlocks
In cases where the cm calls c4iw_modify_rc_qp() with the endpoint
mutex held, they must be called with internal == 1.  rx_data() and
process_mpa_reply() are not doing this.  This causes a deadlock
because c4iw_modify_rc_qp() might call c4iw_ep_disconnect() in some
!internal cases, and c4iw_ep_disconnect() acquires the endpoint mutex.
The design was intended to only do the disconnect for !internal calls.

Change rx_data(), FPDU_MODE case, to call c4iw_modify_rc_qp() with
internal == 1, and then disconnect only after releasing the mutex.

Change process_mpa_reply() to call c4iw_modify_rc_qp(TERMINATE) with
internal == 1 and set a new attr flag telling it to send a TERMINATE
message.  Previously this was implied by !internal.

Change process_mpa_reply() to return whether the caller should
disconnect after releasing the endpoint mutex.  Now rx_data() will do
the disconnect in the cases where process_mpa_reply() wants to
disconnect after the TERMINATE is sent.

Change c4iw_modify_rc_qp() RTS->TERM to only disconnect if !internal,
and to send a TERMINATE message if attrs->send_term is 1.

Change abort_connection() to not aquire the ep mutex for setting the
state, and make all calls to abort_connection() do so with the mutex
held.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2014-04-28 17:29:41 -07:00
..
cm.c RDMA/cxgb4: Fix endpoint mutex deadlocks 2014-04-28 17:29:41 -07:00
cq.c RDMA/cxgb4: Use uninitialized_var() 2014-04-11 11:36:10 -07:00
device.c RDMA/cxgb4: Use the BAR2/WC path for kernel QPs and T5 devices 2014-04-11 11:36:01 -07:00
ev.c RDMA/cxgb4: Handle newer firmware changes 2013-08-13 11:55:44 -07:00
id_table.c drivers/infiniband/hw: rename random32() to prandom_u32() 2013-05-07 18:38:27 -07:00
iw_cxgb4.h RDMA/cxgb4: Fix endpoint mutex deadlocks 2014-04-28 17:29:41 -07:00
Kconfig RDMA/cxgb4: Add support for active and passive open connection with IPv6 address 2013-08-13 11:55:06 -07:00
Makefile RDMA/cxgb4: Remove kfifo usage 2012-05-18 13:22:36 -07:00
mem.c RDMA/cxgb4: Add missing debug stats 2014-04-11 11:36:09 -07:00
provider.c RDMA/cxgb4: Max fastreg depth depends on DSGL support 2014-04-11 11:36:08 -07:00
qp.c RDMA/cxgb4: Fix endpoint mutex deadlocks 2014-04-28 17:29:41 -07:00
resource.c RDMA/cxgb4: Add missing debug stats 2014-04-11 11:36:09 -07:00
t4.h RDMA/cxgb4: Max fastreg depth depends on DSGL support 2014-04-11 11:36:08 -07:00
t4fw_ri_api.h
user.h cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes 2014-03-14 22:44:11 -04:00