diff mbox

[13/15] IB/rxe: Fix reference leaks in memory key invalidation code

Message ID 1483353732.3592.38.camel@sandisk.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Bart Van Assche Jan. 2, 2017, 10:43 a.m. UTC
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

Cc: Moni Shoua <monis@mellanox.com>
Cc: Andrew Boyer <andrew.boyer@dell.com>
---
 drivers/infiniband/sw/
rxe/rxe_req.c  | 1 +
 drivers/infiniband/sw/rxe/rxe_resp.c | 1 +
 2 files changed, 2 insertions(+)

-- 
2.11.0

Comments

Andrew Boyer Jan. 9, 2017, 2:52 p.m. UTC | #1
On 1/2/17, 5:43 AM, "Bart Van Assche" <Bart.VanAssche@sandisk.com> wrote:

>Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>Cc: Moni Shoua <monis@mellanox.com>
>Cc: Andrew Boyer <andrew.boyer@dell.com>
>---
> drivers/infiniband/sw/
>rxe/rxe_req.c  | 1 +
> drivers/infiniband/sw/rxe/rxe_resp.c | 1 +
> 2 files changed, 2 insertions(+)

Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index 64999f529981..1bba4a734e73 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -635,6 +635,7 @@  int rxe_requester(void *arg)
 				goto exit;
 			}
 			rmr->state = RXE_MEM_STATE_FREE;
+			rxe_drop_ref(rmr);
 			wqe->state = wqe_state_done;
 			wqe->status = IB_WC_SUCCESS;
 		} else if (wqe->wr.opcode == IB_WR_REG_MR) {
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 60d78f45aa04..05f374986cea 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -907,6 +907,7 @@  static enum resp_states do_complete(struct rxe_qp *qp,
 					return RESPST_ERROR;
 				}
 				rmr->state = RXE_MEM_STATE_FREE;
+				rxe_drop_ref(rmr);
 			}
 
 			wc->qp			= &qp->ibqp;