[bug report] kmemleak observed during blktests nvme/fc
Yi Zhang
yi.zhang at redhat.com
Sat Dec 27 04:10:13 PST 2025
> > Can you try following ? FYI : - Potential fix, only compile tested.
> >
> > From b3c2e350ae741b18c04abe489dcf9d325537c01c Mon Sep 17 00:00:00 2001
> > From: Chaitanya Kulkarni <ckulkarnilinux at gmail.com>
> > Date: Sun, 14 Dec 2025 19:29:24 -0800
> > Subject: [PATCH COMPILE TESTED ONLY] nvme-fc: release admin tagset if
> > init fails
> >
> > nvme_fabrics creates an NVMe/FC controller in following path:
> >
> > nvmf_dev_write()
> > -> nvmf_create_ctrl()
> > -> nvme_fc_create_ctrl()
> > -> nvme_fc_init_ctrl()
> >
> > Check ctrl->ctrl.admin_tagset in the fail_ctrl path and call
> > nvme_remove_admin_tag_set() to release the resources.
> >
> > Signed-off-by: Chaitanya Kulkarni <ckulkarnilinux at gmail.com>
> > ---
> > drivers/nvme/host/fc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> > index bc455fa98246..6948de3f438a 100644
> > --- a/drivers/nvme/host/fc.c
> > +++ b/drivers/nvme/host/fc.c
> > @@ -3587,6 +3587,8 @@ nvme_fc_init_ctrl(struct device *dev, struct
> > nvmf_ctrl_options *opts,
> >
> > ctrl->ctrl.opts = NULL;
> >
> > + if (ctrl->ctrl.admin_tagset)
> > + nvme_remove_admin_tag_set(&ctrl->ctrl);
> > /* initiate nvme ctrl ref counting teardown */
> > nvme_uninit_ctrl(&ctrl->ctrl);
> >
> did you get a chance to try this ?
Hi Chaitanya
Sorry for the late response, I tried to reproduce this issue recently
but with no luck to reproduce it again.
And during the stress blktests nvme/fc test, I reproduced several panic issue.
I will report it later after I get more info.
>
> -ck
>
--
Best Regards,
Yi Zhang
More information about the Linux-nvme
mailing list