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

Mark Brown broonie at kernel.org
Fri Aug 21 16:58:52 UTC 2015


On Fri, Aug 21, 2015 at 09:14:09AM -0700, Dmitry Torokhov wrote:
> On Fri, Aug 21, 2015 at 08:07:09AM -0700, Julia Lawall wrote:

> > What is there too the "etc"?  Would it be better to just remove the devm
> > functions related to interrupts?  They seem to cause a lot of subtle
> > problems.

> And regulators, clocks, gpios... Even if we won't have interrupt coming
> in someone may submit request to the device (userspace for example) and
> we still may try accessing powered off or half-powered-off hardware.

For most of those there's no issue with devm - we're just releasing a
reference that allows us to control the device, not doing anything that
affects the state of the device.  We don't have managed functions for
the state changing operations.  Interrupts are different here in that
when we free we are also performing the operation that stops the
interrupt firing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linuxfoundation.org/pipermail/ksummit-discuss/attachments/20150821/a188e816/attachment.sig>


More information about the Ksummit-discuss mailing list