From: Greg KH <gregkh@linuxfoundation.org>
To: Mark Walton <mark.walton@serialtek.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Marek Vasut <marek.vasut@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v2] gpio: pca953x: Fix dereference of irq data in shutdown
Date: Thu, 28 Feb 2019 16:15:43 +0100 [thread overview]
Message-ID: <20190228151543.GC1360@kroah.com> (raw)
In-Reply-To: <20190228142539.GA7744@mark-devvm>
On Thu, Feb 28, 2019 at 02:27:33PM +0000, Mark Walton wrote:
> If a PCA953x gpio was used as an interrupt and then released,
> the shutdown function was trying to extract the pca953x_chip
> pointer directly from the irq_data, but in reality was getting
> the gpio_chip structure.
>
> The net effect was that the subsequent writes to the data
> structure corrupted data in the gpio_chip structure, which wasn't
> immediately obvious until attempting to use the GPIO again in the
> future, at which point the kernel panics.
>
> This fix correctly extracts the pca953x_chip structure via the
> gpio_chip structure, as is correctly done in the other irq
> functions.
>
> Fixes: 0a70fe00efea ("gpio: pca953x: Clear irq trigger type on irq shutdown")
> Signed-off-by: Mark Walton <mark.walton@serialtek.com>
> ---
> drivers/gpio/gpio-pca953x.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2019-02-28 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 14:27 [PATCH v2] gpio: pca953x: Fix dereference of irq data in shutdown Mark Walton
2019-02-28 14:36 ` Bartosz Golaszewski
2019-02-28 15:15 ` Greg KH [this message]
2019-02-28 15:33 ` Mark Walton
2019-02-28 15:45 ` Greg KH
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=20190228151543.GC1360@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=mark.walton@serialtek.com \
--cc=stable@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