Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()

Zilin Guan
2025-12-30T06:20:13Z

On Mon, Dec 29, 2025 at 10:09:04AM +0100, Markus Elfring wrote:
> …
> > Fix this by adding mempool_free() in the error path.
>
> Please avoid duplicate source code here.
> https://elixir.bootlin.com/linux/v6.19-rc2/source/drivers/scsi/lpfc/lpfc_init.c#L563-L564

Thanks for pointing this out. I will use a goto label to unify the error
handling logic and avoid code duplication in v2.

> See also:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc3#n262
>
> Regards,
> Markus

Regarding the stable kernel rules, do you consider this bug severe enough
to warrant a Cc: stable tag? Since this error path is unlikely to be
triggered during normal operation and the leak is small, I didn't think
it was critical enough to bother the stable maintainers.

Thanks,
Zilin Guan