diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-03-08 08:21:52 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-03-24 20:53:32 -0400 |
commit | ded260235308f340b979258a4c736e06ba12c747 (patch) | |
tree | 28cb866046d55a9c669174d75fbc27ff94e90429 /drivers/infiniband | |
parent | b172679b0d3b93a6197b2ff892794e7178e3c448 (diff) | |
download | linux-ded260235308f340b979258a4c736e06ba12c747.tar.bz2 |
IB/rxe: double free on error
"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: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_req.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index dbfde0dc6ff7..9f95f50b2909 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -729,11 +729,11 @@ next_wqe: 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; } |