* [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem'
@ 2021-07-02 12:30 ice_yangxiao
2021-07-02 12:58 ` Haakon Bugge
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: ice_yangxiao @ 2021-07-02 12:30 UTC (permalink / raw)
To: linux-rdma; +Cc: jgg, zyjzyj2000, Xiao Yang
From: Xiao Yang <yangx.jy@fujitsu.com>
Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
---
drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index 6aabcb4de235..487cefc015b8 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -122,7 +122,6 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
goto err1;
}
- mr->umem = umem;
num_buf = ib_umem_num_pages(umem);
rxe_mr_init(access, mr);
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem'
2021-07-02 12:30 [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem' ice_yangxiao
@ 2021-07-02 12:58 ` Haakon Bugge
2021-07-05 1:38 ` yangx.jy
2021-07-04 21:43 ` Bob Pearson
2021-07-15 18:01 ` Jason Gunthorpe
2 siblings, 1 reply; 5+ messages in thread
From: Haakon Bugge @ 2021-07-02 12:58 UTC (permalink / raw)
To: ice_yangxiao; +Cc: OFED mailing list, Jason Gunthorpe, Zhu Yanjun, Xiao Yang
> On 2 Jul 2021, at 14:30, ice_yangxiao@163.com wrote:
>
> From: Xiao Yang <yangx.jy@fujitsu.com>
>
> Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
LGTM,
Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Not related to the commit, but whilst reviewing, it looks to me as the second "goto err1" in rxe_mr_init_user() has a memleak because mr->map is not deallocated.
Thxs, Håkon
>
> ---
> drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index 6aabcb4de235..487cefc015b8 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -122,7 +122,6 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
> goto err1;
> }
>
> - mr->umem = umem;
> num_buf = ib_umem_num_pages(umem);
>
> rxe_mr_init(access, mr);
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem'
2021-07-02 12:30 [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem' ice_yangxiao
2021-07-02 12:58 ` Haakon Bugge
@ 2021-07-04 21:43 ` Bob Pearson
2021-07-15 18:01 ` Jason Gunthorpe
2 siblings, 0 replies; 5+ messages in thread
From: Bob Pearson @ 2021-07-04 21:43 UTC (permalink / raw)
To: ice_yangxiao, linux-rdma; +Cc: jgg, zyjzyj2000, Xiao Yang
On 7/2/21 7:30 AM, ice_yangxiao@163.com wrote:
> From: Xiao Yang <yangx.jy@fujitsu.com>
>
> Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
> ---
> drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index 6aabcb4de235..487cefc015b8 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -122,7 +122,6 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
> goto err1;
> }
>
> - mr->umem = umem;
> num_buf = ib_umem_num_pages(umem);
>
> rxe_mr_init(access, mr);
>
Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com>
Looks good.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem'
2021-07-02 12:58 ` Haakon Bugge
@ 2021-07-05 1:38 ` yangx.jy
0 siblings, 0 replies; 5+ messages in thread
From: yangx.jy @ 2021-07-05 1:38 UTC (permalink / raw)
To: Haakon Bugge
Cc: ice_yangxiao, OFED mailing list, Jason Gunthorpe, Zhu Yanjun,
Bob Pearson
On 2021/7/2 20:58, Haakon Bugge wrote:
>
>> On 2 Jul 2021, at 14:30, ice_yangxiao@163.com wrote:
>>
>> From: Xiao Yang<yangx.jy@fujitsu.com>
>>
>> Signed-off-by: Xiao Yang<yangx.jy@fujitsu.com>
> LGTM,
>
> Reviewed-by: Håkon Bugge<haakon.bugge@oracle.com>
>
>
> Not related to the commit, but whilst reviewing, it looks to me as the second "goto err1" in rxe_mr_init_user() has a memleak because mr->map is not deallocated.
Hi,
Sorry for the late reply.
Agreed. I saw Bob Pearson has sent a patch to fix the issue.
Best Regards,
Xiao Yang
>
> Thxs, Håkon
>
>> ---
>> drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
>> index 6aabcb4de235..487cefc015b8 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
>> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
>> @@ -122,7 +122,6 @@ int rxe_mr_init_user(struct rxe_pd *pd, u64 start, u64 length, u64 iova,
>> goto err1;
>> }
>>
>> - mr->umem = umem;
>> num_buf = ib_umem_num_pages(umem);
>>
>> rxe_mr_init(access, mr);
>> --
>> 2.26.2
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem'
2021-07-02 12:30 [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem' ice_yangxiao
2021-07-02 12:58 ` Haakon Bugge
2021-07-04 21:43 ` Bob Pearson
@ 2021-07-15 18:01 ` Jason Gunthorpe
2 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2021-07-15 18:01 UTC (permalink / raw)
To: ice_yangxiao; +Cc: linux-rdma, zyjzyj2000, Xiao Yang
On Fri, Jul 02, 2021 at 08:30:24PM +0800, ice_yangxiao@163.com wrote:
> From: Xiao Yang <yangx.jy@fujitsu.com>
>
> Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
> Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
> Reviewed-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
> drivers/infiniband/sw/rxe/rxe_mr.c | 1 -
> 1 file changed, 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-15 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 12:30 [PATCH] RDMA/rxe: Remove the repeated 'mr->umem = umem' ice_yangxiao
2021-07-02 12:58 ` Haakon Bugge
2021-07-05 1:38 ` yangx.jy
2021-07-04 21:43 ` Bob Pearson
2021-07-15 18:01 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.