Messages in this thread | | | From | Jason Noakes <> | Date | Sun, 5 Oct 2014 16:05:54 -0400 | Subject | Fwd: kobject_init and the zeroed-out-memory requirement |
| |
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 mention the requirement that the memory be zero-initialized before it is passed to kobject_init.
I would like to submit a patch - which solution is preferred?
(a) Update Documentation/kobject.txt and explicitly add the requirement (b) Modify kobject_init to zero out the memory itself like other *_init routines (It already initializes most of its members - just not all of them) (c) Something else?
Your preference?
(Please CC: me on replies).
-- ~~ Jason J. Noakes ~~ jjnoakes@gmail.com
| |