From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH 2/3] Input: wm831x-ts - Convert to devm_kzalloc()
Date: Thu, 11 Oct 2012 09:22:25 -0700 [thread overview]
Message-ID: <20121011162225.GA15588@core.coreip.homeip.net> (raw)
In-Reply-To: <20121011083322.GG11726@opensource.wolfsonmicro.com>
On Thu, Oct 11, 2012 at 05:33:24PM +0900, Mark Brown wrote:
> On Thu, Oct 11, 2012 at 01:27:49AM -0700, Dmitry Torokhov wrote:
> > On Thu, Oct 11, 2012 at 05:07:24PM +0900, Mark Brown wrote:
>
> > >
> > > What's the error pattern you're seeing? I've not noticed much of an
> > > issue here, but if there is one perhaps we can do something to make the
> > > error more obvious or harder to introduce.
>
> > devm_request_irq();
>
> > The problem is that input device is freed but interrupts are still fully
> > functional.
>
> Ah, yes - that one I do spot all the time. I agree that devm_request_irq()
> is a menace, that error is far too easy to introduce and it always seems
> more work to work out if it's safe than the benefit in the cases where
> it can be used.
Right. Another one (the IRQ again): have IRQ schedule [delayed] work and
then use cancel_delayed_work() in ->remove() but rely on devres to free
IRQ which is the wrong order.
>
> The other devm APIs are less problematic, though.
I agree, they are indeed safer. I guess if I add devm_input* the some of
the devm_request_*irq() will be safe as well, but we are not there yet.
--
Dmitry
next prev parent reply other threads:[~2012-10-11 16:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 13:20 [PATCH 1/3] Input: wm831x-ts - Remove unneeded clearing of driver data Mark Brown
2012-10-10 13:20 ` [PATCH 2/3] Input: wm831x-ts - Convert to devm_kzalloc() Mark Brown
2012-10-11 7:39 ` Dmitry Torokhov
2012-10-11 8:07 ` Mark Brown
2012-10-11 8:27 ` Dmitry Torokhov
2012-10-11 8:33 ` Mark Brown
2012-10-11 16:22 ` Dmitry Torokhov [this message]
2012-10-10 13:20 ` [PATCH 3/3] Input: wm831x-on " Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2012-04-18 17:28 [PATCH 1/3] Input: wm831x-ts - Remove unneeded clearing of driver data Mark Brown
2012-04-18 17:28 ` [PATCH 2/3] Input: wm831x-ts - Convert to devm_kzalloc() Mark Brown
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=20121011162225.GA15588@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).