OpenCloudOS-Kernel/drivers/infiniband/sw/siw
Cheng Xu 3056fc6c32 RDMA/siw: Fix duplicated reported IW_CM_EVENT_CONNECT_REPLY event
If siw_recv_mpa_rr returns -EAGAIN, it means that the MPA reply hasn't
been received completely, and should not report IW_CM_EVENT_CONNECT_REPLY
in this case. This may trigger a call trace in iw_cm. A simple way to
trigger this:
 server: ib_send_lat
 client: ib_send_lat -R <server_ip>

The call trace looks like this:

 kernel BUG at drivers/infiniband/core/iwcm.c:894!
 invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
 <...>
 Workqueue: iw_cm_wq cm_work_handler [iw_cm]
 Call Trace:
  <TASK>
  cm_work_handler+0x1dd/0x370 [iw_cm]
  process_one_work+0x1e2/0x3b0
  worker_thread+0x49/0x2e0
  ? rescuer_thread+0x370/0x370
  kthread+0xe5/0x110
  ? kthread_complete_and_exit+0x20/0x20
  ret_from_fork+0x1f/0x30
  </TASK>

Fixes: 6c52fdc244 ("rdma/siw: connection management")
Link: https://lore.kernel.org/r/dae34b5fd5c2ea2bd9744812c1d2653a34a94c67.1657706960.git.chengyou@linux.alibaba.com
Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2022-07-18 14:20:52 +03:00
..
Kconfig RDMA/core: remove use of dma_virt_ops 2020-11-17 15:22:07 -04:00
Makefile
iwarp.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
siw.h RDMA/siw: Fix broken RDMA Read Fence/Resume logic. 2022-02-01 09:54:28 -04:00
siw_cm.c RDMA/siw: Fix duplicated reported IW_CM_EVENT_CONNECT_REPLY event 2022-07-18 14:20:52 +03:00
siw_cm.h
siw_cq.c RDMA/siw: Simplify QP representation 2020-01-03 15:54:09 -04:00
siw_main.c RDMA/siw: Enable siw on tunnel devices 2022-05-11 13:52:38 -03:00
siw_mem.c RDMA/siw: Fix a use after free in siw_alloc_mr 2021-04-27 15:19:21 -03:00
siw_mem.h RDMA: Delete not-used static inline functions 2021-03-22 09:31:19 -03:00
siw_qp.c RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00
siw_qp_rx.c RDMA/siw: Fix broken RDMA Read Fence/Resume logic. 2022-02-01 09:54:28 -04:00
siw_qp_tx.c RDMA/siw: Convert siw_tx_hdt() to kmap_local_page() 2021-07-15 14:42:21 -03:00
siw_verbs.c RDMA: remove useless condition in siw_create_cq() 2022-07-18 12:27:28 +03:00
siw_verbs.h RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00