linux-stable/drivers/infiniband/hw/cxgb4
Krishnamraju Eraparaju d219face90 RDMA/iw_cxgb4: initiate CLOSE when entering TERM
As per draft-hilland-iwarp-verbs-v1.0, sec 6.2.3, always initiate a CLOSE
when entering into TERM state.

In c4iw_modify_qp(), disconnect operation should only be performed when
the modify_qp call is invoked from ib_core. And all other internal
modify_qp calls(invoked within iw_cxgb4) that needs 'disconnect' should
call c4iw_ep_disconnect() explicitly after modify_qp. Otherwise, deadlocks
like below can occur:

 Call Trace:
  schedule+0x2f/0xa0
  schedule_preempt_disabled+0xa/0x10
  __mutex_lock.isra.5+0x2d0/0x4a0
  c4iw_ep_disconnect+0x39/0x430    => tries to reacquire ep lock again
  c4iw_modify_qp+0x468/0x10d0
  rx_data+0x218/0x570              => acquires ep lock
  process_work+0x5f/0x70
  process_one_work+0x1a7/0x3b0
  worker_thread+0x30/0x390
  kthread+0x112/0x130
  ret_from_fork+0x35/0x40

Fixes: d2c33370ae ("RDMA/iw_cxgb4: Always disconnect when QP is transitioning to TERMINATE state")
Link: https://lore.kernel.org/r/20200204091230.7210-1-krishna2@chelsio.com
Signed-off-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-02-11 14:28:00 -04:00
..
cm.c RDMA/iw_cxgb4: initiate CLOSE when entering TERM 2020-02-11 14:28:00 -04:00
cq.c IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
device.c RDMA/iw_cxgb4: fix SRQ access from dump_qp() 2019-10-01 11:48:10 -03:00
ev.c cxgb4: Convert qpidr to XArray 2019-03-25 15:39:18 -03:00
id_table.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
iw_cxgb4.h RDMA: Convert CQ allocations to be under core responsibility 2019-06-11 16:39:49 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mem.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
provider.c RDMA/iw_cxgb4: Report correct port speed/width 2019-10-28 14:11:46 -03:00
qp.c RDMA/iw_cxgb4: initiate CLOSE when entering TERM 2020-02-11 14:28:00 -04:00
resource.c RDMA/cxgb4: Use sizeof() notation 2019-05-27 14:32:17 -03:00
restrack.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
t4.h iw_cxgb4: complete the cached SRQ buffers 2019-02-08 17:02:05 -07:00
t4fw_ri_api.h iw_cxgb4: Support FW write completion WR 2018-08-02 20:16:02 -06:00