[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAN2+FELPuQwt0Xr-r-dThXAeuec7wCtFKv+E+6GSQOG7wJqE3w@mail.gmail.com>
Date: Sun, 5 Oct 2014 16:05:54 -0400
From: Jason Noakes <jjnoakes@...il.com>
To: linux-kernel <linux-kernel@...r.kernel.org>
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@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists