From: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] tpm: Fix IRQ unwind ordering in TIS
Date: Thu, 28 Apr 2016 11:53:16 +0300 [thread overview]
Message-ID: <1461833596.3482.2.camel@linux.intel.com> (raw)
In-Reply-To: <1461830953.3482.1.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On Thu, 2016-04-28 at 11:09 +0300, Jarkko Sakkinen wrote:
> On Wed, 2016-04-27 at 10:58 -0600, Jason Gunthorpe wrote:
> >
> > The devm for the IRQ was placed on the chip, not the pdev. This can
> > cause the irq to be still callable after the pdev has been cleaned up
> > (eg priv kfree'd).
> >
> > Found by CONFIG_DEBUG_SHIRQ=y
> >
> > Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > Fixes: 233a065e0cd0 ("tpm: Get rid of chip->pdev")
> > Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> > Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
And applied and merged to next.
/Jarkko
> /Jarkko
>
> >
> > ---
> > drivers/char/tpm/tpm_tis.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > index a6b2d460bfc0..d88827046a42 100644
> > --- a/drivers/char/tpm/tpm_tis.c
> > +++ b/drivers/char/tpm/tpm_tis.c
> > @@ -387,7 +387,7 @@ static void disable_interrupts(struct tpm_chip *chip)
> > intmask &= ~TPM_GLOBAL_INT_ENABLE;
> > iowrite32(intmask,
> > priv->iobase + TPM_INT_ENABLE(priv->locality));
> > - devm_free_irq(&chip->dev, priv->irq, chip);
> > + devm_free_irq(chip->dev.parent, priv->irq, chip);
> > priv->irq = 0;
> > chip->flags &= ~TPM_CHIP_FLAG_IRQ;
> > }
> > @@ -604,7 +604,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32
> > intmask,
> > struct priv_data *priv = dev_get_drvdata(&chip->dev);
> > u8 original_int_vec;
> >
> > - if (devm_request_irq(&chip->dev, irq, tis_int_handler, flags,
> > + if (devm_request_irq(chip->dev.parent, irq, tis_int_handler, flags,
> > dev_name(&chip->dev), chip) != 0) {
> > dev_info(&chip->dev, "Unable to request irq: %d for probe\n",
> > irq);
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel
prev parent reply other threads:[~2016-04-28 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 16:58 [PATCH] tpm: Fix IRQ unwind ordering in TIS Jason Gunthorpe
2016-04-28 8:09 ` Jarkko Sakkinen
[not found] ` <1461830953.3482.1.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-28 8:53 ` Jarkko Sakkinen [this message]
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=1461833596.3482.2.camel@linux.intel.com \
--to=jarkko.sakkinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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).