Hello Lin Yi, On 06.05.20 15:45, 亿一 wrote: > I notice that most of the usage of kobject_init_and_add in drivers are > wrong, and now some drivers code has maken it right, > please see commit dfb5394f804e (https://lkml.org/lkml/2020/4/11/282). > > function pdcs_register_pathentries() in drivers/parisc/pdc_stable.c may > have the similar issue and leak kobject. > if kobject_init_and_add() failed, the entry->kobj may already > increased it's refcnt and allocated memory to store it's name, > so a kobject_put is need before return. Yes, you are correct. It's a possible leak. Can you send a patch so I can apply it? Helge