public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: lars@metafoo•de (Lars-Peter Clausen)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
Date: Mon, 15 Jul 2013 13:33:53 +0200	[thread overview]
Message-ID: <51E3DE21.9060105@metafoo.de> (raw)
In-Reply-To: <2A7ABDFCE21540479A5AEB0244A684D5E3D067@DNCE04.ent.ti.com>

On 07/15/2013 01:09 PM, Kozaruk, Oleksandr wrote:
[...]
> 
>>> +     ret = devm_request_threaded_irq(dev, irq, NULL,
>>> +                                     twl6030_gpadc_irq_handler,
>>> +                                     IRQF_ONESHOT, "twl6030_gpadc", gpadc);
>>
>> You access memory in the interrupt handler which is freed before the interrupt
>> handler is freed.
> Thanks for pointing this. devm_* will free memory for irq after the driver
> is removed and memory for the device is freed. I took me awhile to understand
> this. Is there going to be something like devm_iio_device_alloc? whould it be helpfull?
> 

Yes, I think it certainly makes sense to add a devm_iio_device_alloc(), care
to send a patch?

  reply	other threads:[~2013-07-15 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12  7:18 [PATCH v3 0/2] TWL6030, TWL6032 GPADC driver Oleksandr Kozaruk
2013-07-12  7:18 ` [PATCH v3 1/2] ARM: dts: twl: Add GPADC data to device tree Oleksandr Kozaruk
2013-07-12  7:18 ` [PATCH v3 2/2] iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver Oleksandr Kozaruk
2013-07-12 19:42   ` Jonathan Cameron
2013-07-15 13:30     ` Kozaruk, Oleksandr
2013-07-15 14:05       ` Graeme Gregory
2013-07-12 19:56   ` Lars-Peter Clausen
2013-07-15 11:09     ` Kozaruk, Oleksandr
2013-07-15 11:33       ` Lars-Peter Clausen [this message]
2013-07-17 13:45         ` Oleksandr Kozaruk
2013-07-17 14:47           ` Lars-Peter Clausen
2013-07-15 11:56     ` Grygorii Strashko
2013-07-15 12:33       ` Lars-Peter Clausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E3DE21.9060105@metafoo.de \
    --to=lars@metafoo$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox