Re: [PATCH v2] RDMA: release allocated skb

2019-10-04 Thread Navid Emamdoost
Hi Leon and Potnuri, Based on the following call sequence, skb is passed along to uld_send(). c4iw_ref_send_wait c4iw_ofld_send cxgb4_ofld_send t4_ofld_send uld_send In uld_send() skb is consumed (released or added

Re: [PATCH v2] RDMA: release allocated skb

2019-10-03 Thread Potnuri Bharat Teja
On Thursday, October 10/03/19, 2019 at 03:05:06 +0530, Navid Emamdoost wrote: > Hi Jason, > > Thanks for the feedback. Yes, you are right if the skb release is > moved under err4 label it will cause a double free as > c4iw_ref_send_wait will release skb in case of error. > So, in order to avoid

Re: [PATCH v2] RDMA: release allocated skb

2019-10-03 Thread Leon Romanovsky
On Wed, Oct 02, 2019 at 04:35:06PM -0500, Navid Emamdoost wrote: > Hi Jason, > > Thanks for the feedback. Yes, you are right if the skb release is > moved under err4 label it will cause a double free as > c4iw_ref_send_wait will release skb in case of error. > So, in order to avoid leaking skb in

Re: [PATCH v2] RDMA: release allocated skb

2019-10-02 Thread Navid Emamdoost
Hi Jason, Thanks for the feedback. Yes, you are right if the skb release is moved under err4 label it will cause a double free as c4iw_ref_send_wait will release skb in case of error. So, in order to avoid leaking skb in case of c4iw_bar2_addrs failure, the kfree(skb) could be placed under the

Re: [PATCH v2] RDMA: release allocated skb

2019-10-01 Thread Jason Gunthorpe
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 > drivers/infiniband/hw/cxgb4/cq.c | 1 + > 1

[PATCH v2] RDMA: release allocated skb

2019-09-23 Thread Navid Emamdoost
In create_cq, the allocated skb buffer needs to be released on error path. Moved the kfree_skb(skb) under err4 label. Signed-off-by: Navid Emamdoost --- drivers/infiniband/hw/cxgb4/cq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/cxgb4/cq.c