From: Jason Gunthorpe <jgg@ziepe.ca>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: leon@kernel.org, emamd001@umn.edu, smccaman@umn.edu,
kjlu@umn.edu, Potnuri Bharat Teja <bharat@chelsio.com>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] RDMA: release allocated skb
Date: Tue, 1 Oct 2019 10:54:30 -0300 [thread overview]
Message-ID: <20191001135430.GA27086@ziepe.ca> (raw)
In-Reply-To: <20190923155300.20407-1-navid.emamdoost@gmail.com>
On Mon, Sep 23, 2019 at 10:52:59AM -0500, Navid Emamdoost wrote:
> In create_cq, the allocated skb buffer needs to be released on error
> path.
> Moved the kfree_skb(skb) under err4 label.
This didn't move anything
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> drivers/infiniband/hw/cxgb4/cq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
> index b1bb61c65f4f..1886c1af10bc 100644
> +++ b/drivers/infiniband/hw/cxgb4/cq.c
> @@ -173,6 +173,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
> err4:
> dma_free_coherent(&rdev->lldi.pdev->dev, cq->memsize, cq->queue,
> dma_unmap_addr(cq, mapping));
> + kfree_skb(skb);
> err3:
> kfree(cq->sw_queue);
> err2:
This looks wrong to me:
int c4iw_ofld_send(struct c4iw_rdev *rdev, struct sk_buff *skb)
{
int error = 0;
if (c4iw_fatal_error(rdev)) {
kfree_skb(skb);
pr_err("%s - device in error state - dropping\n", __func__);
return -EIO;
}
error = cxgb4_ofld_send(rdev->lldi.ports[0], skb);
if (error < 0)
kfree_skb(skb);
return error < 0 ? error : 0;
}
Jason
next prev parent reply other threads:[~2019-10-01 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190923050823.GL14368@unreal>
2019-09-23 15:52 ` [PATCH v2] RDMA: release allocated skb Navid Emamdoost
2019-10-01 13:54 ` Jason Gunthorpe [this message]
2019-10-02 21:35 ` Navid Emamdoost
2019-10-03 8:20 ` Leon Romanovsky
2019-10-03 10:25 ` Potnuri Bharat Teja
2019-10-04 18:12 ` Navid Emamdoost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191001135430.GA27086@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=bharat@chelsio.com \
--cc=dledford@redhat.com \
--cc=emamd001@umn.edu \
--cc=kjlu@umn.edu \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=smccaman@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).