Re: [PATCH] edac: Fix reference count leak in edac_device_register_sysfs_main_kobj()

From: Markus Elfring
Date: Fri May 29 2020 - 04:45:58 EST


> object_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.

Would you like to indicate with such information (according to
the topic ânet-sysfs: Fix reference count leak in rx|netdev_queue_add_kobjectâ)
that your issue was detected also with the help of the kernel fuzzing
tool âsyzkallerâ?


How do you think about to add an imperative wording to the change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=b0c3ba31be3e45a130e13b278cf3b90f69bda6f6#n151


Will it be helpful to combine this update step together with
âedac: Fix reference count leak in edac_pci_main_kobj_setupâ
into a small patch series?
https://lore.kernel.org/lkml/20200528202238.18078-1-wu000273@xxxxxxx/
https://lore.kernel.org/patchwork/patch/1249351/

Regards,
Markus