[PATCH v2 07/15] nvmet-fcloop: update refs on tfcp_req
Daniel Wagner
dwagner at suse.de
Tue Mar 11 08:06:26 PDT 2025
On Tue, Mar 11, 2025 at 11:11:33AM +0100, Daniel Wagner wrote:
> @@ -930,6 +932,8 @@ fcloop_fcp_req_release(struct nvmet_fc_target_port *tgtport,
> {
> struct fcloop_fcpreq *tfcp_req = tgt_fcp_req_to_fcpreq(tgt_fcpreq);
>
> + if (!fcloop_tfcp_req_get(tfcp_req))
> + return;
> queue_work(nvmet_wq, &tfcp_req->tio_done_work);
> }
The ref is already taken in fcloop_fcp_req, so this is wrong and is the
reason for memory leak I observed.
More information about the Linux-nvme
mailing list