lkml.org 
[lkml]   [2021]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] nvmet: fix memory leak on nvmet_alloc_ctrl()
From
Date
On 2021/5/19 4:27, Chaitanya Kulkarni wrote:
> On 5/18/21 01:21, Wu Bo wrote:
>> From: Wu Bo <wubo40@huawei.com>
>>
>> When cntlid_min is greater than cntlid_max,
>> goto wrong label, should be goto out_free_sqs
>> label. Otherwise there is a memory leak problem
>> on the nvmet_alloc_ctrl function().
>>
>> Fixes: 94a39d61f80f ("nvmet: make ctrl-id configurable")
>> Fixes: 6d65aeab7bf6e ("nvmet: remove unused ctrl->cqs")
>> Signed-off-by: Wu Bo <wubo40@huawei.com>
>> ---
>
> Looks good, except commit message could be better :-
>
> When cntlid_min is greater than cntlid_max, goto wrong label, should be
> goto out_free_sqs label. Otherwise there is a memory leak problem on the
> nvmet_alloc_ctrl function().
>
> Fixes: 94a39d61f80f ("nvmet: make ctrl-id configurable")
> Fixes: 6d65aeab7bf6 ("nvmet: remove unused ctrl->cqs")
> Signed-off-by: Wu Bo <wubo40@huawei.com>
>
>
> with above :-

Thanks for your review. I will make the commit message better.
and I found the nvmet-loop has a similar issue,
will send patch series soon.

Thanks,
Wu Bo
>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
>
>
> .
>

\
 
 \ /
  Last update: 2021-05-19 06:32    [W:0.090 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site