diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-01-10 19:15:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-15 14:53:16 (GMT) |
commit | 326ef0fd4fb2d4a494ff87cb5971cf38ebf8c97b (patch) | |
tree | 0cb9cf5a80f7c0f2314447930a95340996bc6269 | |
parent | 93e1956dddf5bfea3a4de0da63f06a2a950965e6 (diff) | |
download | linux-326ef0fd4fb2d4a494ff87cb5971cf38ebf8c97b.tar.xz |
IB/rxe: Fix reference leaks in memory key invalidation code
[ Upstream commit ab17654476a11a1ed7d89f1104e2acdb7ed1c9ed ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>
Cc: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_req.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_resp.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index 9f46be5..9d08478 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -633,6 +633,7 @@ next_wqe: 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 69ed4e0..7705820 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -893,6 +893,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; |