Skip to content

Commit

Permalink
IB/rxe: double free on error
Browse files Browse the repository at this point in the history
"goto err;" has it's own kfree_skb() call so it's a double free.  We
only need to free on the "goto exit;" path.

Fixes: 8700e3e ("Soft RoCE driver")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
Dan Carpenter authored and dledford committed Mar 25, 2017
1 parent b172679 commit ded2602
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rxe/rxe_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,11 @@ int rxe_requester(void *arg)
ret = rxe_xmit_packet(to_rdev(qp->ibqp.device), qp, &pkt, skb);
if (ret) {
qp->need_req_skb = 1;
kfree_skb(skb);

rollback_state(wqe, qp, &rollback_wqe, rollback_psn);

if (ret == -EAGAIN) {
kfree_skb(skb);
rxe_run_task(&qp->req.task, 1);
goto exit;
}
Expand Down

0 comments on commit ded2602

Please sign in to comment.