lkml.org 
[lkml]   [2014]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectFwd: 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


\
 
 \ /
  Last update: 2014-10-05 22:41    [W:0.022 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site