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
~~ [email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to