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

Dan Carpenter
2026-01-05T09:53:45Z

On Tue, Dec 30, 2025 at 06:20:08AM +0000, Zilin Guan wrote:
> 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.

I don't agree with either of Markus's review comments. People have
asked him to stop reviewing code or at least to stick to pointing out
bugs or complaining about style and grammar issues but he doesn't
listen.

https://lore.kernel.org/all/2025121108-armless-earthling-7a6f@gregkh/

regards,
dan carpenter