On 10/21/24 18:27, Christoph Lameter (Ampere) wrote: > On Mon, 21 Oct 2024, Vlastimil Babka wrote: > >> I think the comment "If this function returns an error, kobject_put() must >> be called" means that *if* you want to destroy it due to the failure, you >> must use kobject_put() and not e.g. kfree(). But IMHO it doesn't mean you >> must destroy it because of the kobject_add() failure. > > Right. The simplest solution is to see the sysfs stuff as optional. If it To clarify, I only meant the case of boot caches processed for sysfs later. I don't think we need to start ignoring all sysfs errors. > fails to create the sysfs pieces then write a warning to syslog but let > the cache creation succeed.