Message ID | c4ad39d9a5c7b22e60fbbfd43dc2f8b068e2eea9.1620343860.git.metze@samba.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | rdma/siw: fix a lot of deadlocks and use after free bugs | expand |
-----"Stefan Metzmacher" <metze@samba.org> wrote: ----- >To: "Bernard Metzler" <bmt@zurich.ibm.com> >From: "Stefan Metzmacher" <metze@samba.org> >Date: 05/07/2021 01:38AM >Cc: linux-rdma@vger.kernel.org, "Stefan Metzmacher" <metze@samba.org> >Subject: [EXTERNAL] [PATCH 08/31] rdma/siw: use >__siw_cep_terminate_upcall() for indirect SIW_CM_WORK_CLOSE_LLP > >Both code paths from siw_qp_cm_drop() should use the same logic. > >Fixes: 6c52fdc244b5 ("rdma/siw: connection management") >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Cc: Bernard Metzler <bmt@zurich.ibm.com> >Cc: linux-rdma@vger.kernel.org >--- > drivers/infiniband/sw/siw/siw_cm.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > >diff --git a/drivers/infiniband/sw/siw/siw_cm.c >b/drivers/infiniband/sw/siw/siw_cm.c >index c91a74271b9b..b7e7f637bd03 100644 >--- a/drivers/infiniband/sw/siw/siw_cm.c >+++ b/drivers/infiniband/sw/siw/siw_cm.c >@@ -1071,11 +1071,7 @@ static void siw_cm_work_handler(struct >work_struct *w) > /* > * QP scheduled LLP close > */ >- if (cep->qp && cep->qp->term_info.valid) >- siw_send_terminate(cep->qp); >- leave that there. >- if (cep->cm_id) >- siw_cm_upcall(cep, IW_CM_EVENT_CLOSE, 0); >+ __siw_cep_terminate_upcall(cep, -EINVAL); > > release_cep = 1; > break; >-- >2.25.1 > >
diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c index c91a74271b9b..b7e7f637bd03 100644 --- a/drivers/infiniband/sw/siw/siw_cm.c +++ b/drivers/infiniband/sw/siw/siw_cm.c @@ -1071,11 +1071,7 @@ static void siw_cm_work_handler(struct work_struct *w) /* * QP scheduled LLP close */ - if (cep->qp && cep->qp->term_info.valid) - siw_send_terminate(cep->qp); - - if (cep->cm_id) - siw_cm_upcall(cep, IW_CM_EVENT_CLOSE, 0); + __siw_cep_terminate_upcall(cep, -EINVAL); release_cep = 1; break;
Both code paths from siw_qp_cm_drop() should use the same logic. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Stefan Metzmacher <metze@samba.org> Cc: Bernard Metzler <bmt@zurich.ibm.com> Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/sw/siw/siw_cm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)