linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: santosh shilimkar <santosh.shilimkar@oracle.com>
Cc: Tony Lindgren <tony@atomide.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Felipe Balbi <balbi@ti.com>,
	Javier Martinez Canillas <javier@dowhile0.org>,
	Kevin Hilman <khilman@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>
Subject: Re: [PATCH 1/1] gpio: omap: Fix bad device access with setup_irq()
Date: Sat, 17 Jan 2015 10:10:57 +0000	[thread overview]
Message-ID: <20150117101057.GZ11502@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <54B9AA9D.7080300@oracle.com>

On Fri, Jan 16, 2015 at 04:19:41PM -0800, santosh shilimkar wrote:
> On 1/16/2015 2:50 PM, Tony Lindgren wrote:
> >Similar to omap_gpio_irq_type() let's make sure that the GPIO
> >is usable as an interrupt if the platform init code did not
> >call gpio_request(). Otherwise we can get invalid device access
> >after setup_irq():
> >
> I let Linus W comment on it but IIRC we chewed this issue last
> time and the conclusion was the gpio_request() must have to be called
> directly or indirectly in case of irq line.

That's really not the issue here.

The issue is that it's possible to claim the interrupt, and then the
driver goes wrong - not only does it attempt in that case to access
hardware which is runtime suspended, if the interrupt is subsequently
freed, it will then do a pm_runtime_put().

The interrupt code is wrong there, plain and simple.

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

  parent reply	other threads:[~2015-01-17 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 22:50 [PATCH 1/1] gpio: omap: Fix bad device access with setup_irq() Tony Lindgren
2015-01-16 22:55 ` Felipe Balbi
2015-01-17  0:19 ` santosh shilimkar
2015-01-17  1:00   ` Tony Lindgren
2015-01-19 19:05     ` santosh.shilimkar
2015-01-17 10:10   ` Russell King - ARM Linux [this message]
2015-01-21 16:41 ` Linus Walleij
2015-01-21 21:39 ` Javier Martinez Canillas

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=20150117101057.GZ11502@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=balbi@ti.com \
    --cc=gnurou@gmail.com \
    --cc=javier@dowhile0.org \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@oracle.com \
    --cc=ssantosh@kernel.org \
    --cc=tony@atomide.com \
    /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).