linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] nilfs2: Fix reference count leak in nilfs_sysfs_create_snapshot_group()
@ 2020-05-28 19:48 Markus Elfring
       [not found] ` <CAMV6ehE3jm4ZasYqd12f=e0TNN_kfiX7yCMVHkmESKP0WbuqTw@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-05-28 19:48 UTC (permalink / raw)
  To: Qiushi Wu, linux-nilfs
  Cc: kernel-janitors, linux-kernel, Andrew Morton, Kangjie Lu,
	Ryusuke Konishi, Vyacheslav Dubeyko

> kobject_init_and_add() takes reference even when it fails.

It will be helpful to mention which object is referenced here, won't it?


> If this function returns an error, kobject_put() must be called to
> properly clean up the memory associated with the object.

I guess that an imperative wording is preferred also for this change description.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=b0c3ba31be3e45a130e13b278cf3b90f69bda6f6#n151

How do you think about to combine this update step together with
“nilfs2: Fix reference count leak in nilfs_sysfs_create_device_group”
into a small patch series?
https://lore.kernel.org/patchwork/patch/1248696/
https://lore.kernel.org/lkml/20200527200933.31135-1-wu000273@umn.edu/

Regards,
Markus

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

* Re: nilfs2: Fix reference count leak in nilfs_sysfs_create_snapshot_group()
       [not found] ` <CAMV6ehE3jm4ZasYqd12f=e0TNN_kfiX7yCMVHkmESKP0WbuqTw@mail.gmail.com>
@ 2020-05-29  4:51   ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-05-29  4:51 UTC (permalink / raw)
  To: Qiushi Wu, linux-nilfs
  Cc: kernel-janitors, LKML, Andrew Morton, Kangjie Lu,
	Ryusuke Konishi, Vyacheslav Dubeyko

> I think there is only one object that can be modified in this function,

Such a view can be reasonable.


> so I didn't mention it.

I suggest to reconsider the conclusion.


>> I guess that an imperative wording is preferred also for this change description.
>
> This sentence is referenced from the code comment, so I haven't change it.
> https://elixir.bootlin.com/linux/v5.7-rc7/source/lib/kobject.c#L459

I find that that there are further possibilities to consider for improvements
around the presented commit message (even after the mentioned copy
from the function description of this programming interface).


>> How do you think about to combine this update step together with
>> “nilfs2: Fix reference count leak in nilfs_sysfs_create_device_group”
>> into a small patch series?
>
> I'd like to improve the similar issues after I reporting this bunch of bugs.

Did you find questionable implementation details with the help of an evolving
source code analysis tool?

Regards,
Markus

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 19:48 [PATCH] nilfs2: Fix reference count leak in nilfs_sysfs_create_snapshot_group() Markus Elfring
     [not found] ` <CAMV6ehE3jm4ZasYqd12f=e0TNN_kfiX7yCMVHkmESKP0WbuqTw@mail.gmail.com>
2020-05-29  4:51   ` 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).