public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
       [not found] <20251229071515.155412-2-zilin@seu.edu.cn>
@ 2025-12-29  9:09 ` Markus Elfring
  2025-12-30  6:20   ` Zilin Guan
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2025-12-29  9:09 UTC (permalink / raw)
  To: Jianhao Xu, Zilin Guan, linux-scsi, Justin Tee
  Cc: LKML, kernel-janitors, James Bottomley, Martin K. Petersen,
	Paul Ely

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


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
  2025-12-29  9:09 ` [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post() Markus Elfring
@ 2025-12-30  6:20   ` Zilin Guan
  2025-12-30  7:28     ` [1/3] " Markus Elfring
  2026-01-05  9:53     ` [PATCH 1/3] " Dan Carpenter
  0 siblings, 2 replies; 6+ messages in thread
From: Zilin Guan @ 2025-12-30  6:20 UTC (permalink / raw)
  To: markus.elfring
  Cc: James.Bottomley, jianhao.xu, justin.tee, kernel-janitors,
	linux-kernel, linux-scsi, martin.petersen, paul.ely, zilin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
  2025-12-30  6:20   ` Zilin Guan
@ 2025-12-30  7:28     ` Markus Elfring
  2025-12-30  9:05       ` Zilin Guan
  2026-01-05  9:53     ` [PATCH 1/3] " Dan Carpenter
  1 sibling, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2025-12-30  7:28 UTC (permalink / raw)
  To: Zilin Guan, linux-scsi
  Cc: kernel-janitors, LKML, James Bottomley, Jianhao Xu, Justin Tee,
	Martin K. Petersen, Paul Ely

>> 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
> Regarding the stable kernel rules, do you consider this bug severe enough 
> to warrant a Cc: stable tag?

I suggest to take another look at information from previous discussions on
severity filters.


>                              Since this error path is unlikely to be 
> triggered during normal operation and the leak is small,

It seems that basic data processing was not hindered so far by the affected
function implementation.


>                                                          I didn't think 
> it was critical enough to bother the stable maintainers.

The tag “Fixes” is also an indication for related development considerations,
isn't it?

Regards,
Markus

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
  2025-12-30  7:28     ` [1/3] " Markus Elfring
@ 2025-12-30  9:05       ` Zilin Guan
  0 siblings, 0 replies; 6+ messages in thread
From: Zilin Guan @ 2025-12-30  9:05 UTC (permalink / raw)
  To: markus.elfring
  Cc: James.Bottomley, jianhao.xu, justin.tee, kernel-janitors,
	linux-kernel, linux-scsi, martin.petersen, paul.ely, zilin

> I suggest to take another look at information from previous discussions on
> severity filters.
> ...
> It seems that basic data processing was not hindered so far by the affected
> function implementation.
> ...
> The tag “Fixes” is also an indication for related development considerations,
> isn't it?

Thanks for the clarification.

I agree that the "Fixes" tag provides sufficient context for tracking. 
Given that the bug does not impact basic functionality, I will rely 
on the "Fixes" tag and leave the backporting decision to the stable 
maintainers' discretion, rather than explicitly adding the "Cc: stable".

I will send out v2 with the code refactoring (using goto) shortly.

Regards,
Zilin Guan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
  2025-12-30  6:20   ` Zilin Guan
  2025-12-30  7:28     ` [1/3] " Markus Elfring
@ 2026-01-05  9:53     ` Dan Carpenter
  2026-01-05 10:17       ` Dan Carpenter
  1 sibling, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2026-01-05  9:53 UTC (permalink / raw)
  To: Zilin Guan
  Cc: markus.elfring, James.Bottomley, jianhao.xu, justin.tee,
	kernel-janitors, linux-kernel, linux-scsi, martin.petersen,
	paul.ely

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
  2026-01-05  9:53     ` [PATCH 1/3] " Dan Carpenter
@ 2026-01-05 10:17       ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2026-01-05 10:17 UTC (permalink / raw)
  To: Zilin Guan
  Cc: markus.elfring, James.Bottomley, jianhao.xu, justin.tee,
	kernel-janitors, linux-kernel, linux-scsi, martin.petersen,
	paul.ely

On Mon, Jan 05, 2026 at 12:53:40PM +0300, Dan Carpenter wrote:
> 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.

I meant "or at least stop complaining about style and grammar issues".

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-05 10:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251229071515.155412-2-zilin@seu.edu.cn>
2025-12-29  9:09 ` [PATCH 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post() Markus Elfring
2025-12-30  6:20   ` Zilin Guan
2025-12-30  7:28     ` [1/3] " Markus Elfring
2025-12-30  9:05       ` Zilin Guan
2026-01-05  9:53     ` [PATCH 1/3] " Dan Carpenter
2026-01-05 10:17       ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox