Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj.

2020-06-02 Thread Martin K. Petersen
On Thu, 28 May 2020 15:13:53 -0500, wu000...@umn.edu wrote: > kobject_init_and_add() should be handled when it return an error, > because kobject_init_and_add() takes reference even when it fails. > If this function returns an error, kobject_put() must be called to > properly clean up the memory a

Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj.

2020-05-29 Thread Lee Duncan
On 5/28/20 1:13 PM, wu000...@umn.edu wrote: > From: Qiushi Wu > > kobject_init_and_add() should be handled when it return an error, > because kobject_init_and_add() takes reference even when it fails. > If this function returns an error, kobject_put() must be called to > properly clean up the mem

Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj()

2020-05-29 Thread Markus Elfring
> 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.

Re: [PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj()

2020-05-29 Thread Markus Elfring
> 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.

[PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() should be handled when it return an error, because kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718