Skip to contentSkip to conversation

scsi: Fix reference count leak in iscsi_boot_create_kobj()

PATCH Markus Elfring 1 participant 1 message May 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

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.

Quoted 1 line

Previous commit "b8eb718348b8" fixed a similar problem.

I suggest to omit this information from the commit message.

Quoted 1 line

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