Re: [BUG] git 2.6.31-rc3'ish: "<kobject> does not have a release() function, it is broken and must be fixed."

From: Roland Dreier
Date: Thu Aug 06 2009 - 19:47:41 EST



> Kay, we were cleaning up the kobject name stuff then, and we thought
> that this release function wasn't used anymore. But in looking at the
> code, I can't see where the kobject is actually freed. What am I
> missing?

the kobject in question is freed at

free_module() ->
mod_kobject_remove() ->
mod_sysfs_fini() ->
kobject_put(&mod->mkobj.kobj);

(in kernel/module.c)

Of course the release function you removed in 7a6a4161 was empty so it
wasn't doing anything except satisfying the "all kobjects must have a
release method" diktat.

- R.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/