From: Andrew Boyer Date: Wed, 23 Nov 2016 17:39:24 +0000 (-0500) Subject: IB/rxe: Fix ref leak in duplicate_request() X-Git-Tag: v4.10-rc1~97^2~1^5~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5407f530122aa63cf304eb0874c938b3bdb8d3fb;p=karo-tx-linux.git IB/rxe: Fix ref leak in duplicate_request() A ref was added after the call to skb_clone(). Signed-off-by: Andrew Boyer Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index a5e9ce34171b..8643797fb530 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -1145,6 +1145,7 @@ static enum resp_states duplicate_request(struct rxe_qp *qp, pkt, skb_copy); if (rc) { pr_err("Failed resending result. This flow is not handled - skb ignored\n"); + rxe_drop_ref(qp); kfree_skb(skb_copy); rc = RESPST_CLEANUP; goto out;