Explicitly document the requirement that the memory passed to
kobject_init() must be zero-initialized beforehand.
Signed-off-by: Jason J. Noakes
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index f87241d..1b38727 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/ko
> No driver should be working with "raw" kobjects.
I don't agree, but it's irrelevant. If the functions are exported and
documented, the documentation should be complete.
> kobject_init() has been there for a very long time, and yes, we don't
> always have the best naming scheme in the kernel, th
> Is there any in-kernel code that does not properly zero out the memory
> before calling kobject_init()?
I'm not sure. I didn't find any, but I've seen it bite people writing
drivers more than once where I work, and the latest oops I just
debugged a few days ago prompted me to address the issue a
I noticed that kobject_init() requres the kobject passed in to be
zeroed out fully first.
Many other *_init kernel routines (cdev_init, kref_init, mutex_init,
spin_lock_init, etc) do not have the same requirement - they work on
fully uninitialized memory.
Documentation/kobject.txt does not mentio
4 matches
Mail list logo