[Ksummit-discuss] [TECH TOPIC] Fix devm_kzalloc, its users, or both

Russell King - ARM Linux linux at arm.linux.org.uk
Sun Aug 2 14:05:08 UTC 2015


On Fri, Jul 31, 2015 at 12:41:24PM -0700, Dmitry Torokhov wrote:
> On Fri, Jul 31, 2015 at 11:40:39AM -0700, James Bottomley wrote:
> > Russell says, this looks to be an orthogonal problem to devm_kzalloc.
> 
> Yes, it is except that devm_* is magical and people expect it to somehow
> release resources only at the right time.

Who's been selling it as such?  If it's been mis-sold, then maybe there's
a responsibility on people who see such mis-selling of the API to correct
those creating this fantasy, rather than ignoring it.

People try to create APIs which ease the burden of review, and then other
people go around selling it as the worlds cure to hunger.  If no one
bothers to correct those doing the mis-selling, then that's not the fault
of the API.  That's a community problem.  Don't blame the API.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


More information about the Ksummit-discuss mailing list