Thread (4 messages) 4 messages, 3 authors, 2021-05-19

Re: [PATCH] nvmet: fix memory leak on nvmet_alloc_ctrl()

From: Chaitanya Kulkarni <hidden>
Date: 2021-05-18 20:27:52
Also in: lkml

On 5/18/21 01:21, Wu Bo wrote:
From: Wu Bo <redacted>

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 <redacted>
---
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 <redacted>


with above :-

Reviewed-by: Chaitanya Kulkarni <redacted>



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help