linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj()
@ 2020-05-29 10:09 Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-05-29 10:09 UTC (permalink / raw)
  To: Qiushi Wu, linux-scsi, open-iscsi
  Cc: kernel-janitors, linux-kernel, Chris Leech,
	James E. J. Bottomley, Kangjie Lu, Lee Duncan,
	Martin K. Petersen

> kobject_init_and_add() should be handled when it return an error,
> because kobject_init_and_add() takes reference even when it fails.

I find this wording approach improvable.


> Previous commit "b8eb718348b8" fixed a similar problem.

I suggest to omit this information from the commit message.


> Thus replace calling kfree() by calling kobject_put().

How do you think about a wording variant like the following?

   Thus replace a call of the function “kfree” by “kobject_put”
   because of using kernel objects in the proper way.


Please take another look also at the message field “To”.
Which recipients should be specified there first?

Regards,
Markus

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

* Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj()
@ 2020-05-29 10:09 Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-05-29 10:09 UTC (permalink / raw)
  To: Qiushi Wu, linux-scsi, open-iscsi
  Cc: kernel-janitors, linux-kernel, Chris Leech,
	James E. J. Bottomley, Kangjie Lu, Lee Duncan,
	Martin K. Petersen

> kobject_init_and_add() should be handled when it return an error,
> because kobject_init_and_add() takes reference even when it fails.

I find this wording approach improvable.


> Previous commit "b8eb718348b8" fixed a similar problem.

I suggest to omit this information from the commit message.


> Thus replace calling kfree() by calling kobject_put().

How do you think about a wording variant like the following?

   Thus replace a call of the function “kfree” by “kobject_put”
   because of using kernel objects in the proper way.


Please take another look also at the message field “To”.
Which recipients should be specified there first?

Regards,
Markus

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

end of thread, other threads:[~2020-05-29 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 10:09 [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj() Markus Elfring
2020-05-29 10:09 Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).