lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 21 Apr 2020 15:23:19 +0200 From: Hans de Goede <hdegoede@...hat.com> To: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>, linux-integrity@...r.kernel.org Cc: stable@...r.kernel.org, Peter Huewe <peterhuewe@....de>, Jason Gunthorpe <jgg@...pe.ca>, Arnd Bergmann <arnd@...db.de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, open list <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v2] tpm/tpm_tis: Free IRQ if probing fails Hi, On 4/16/20 6:07 PM, Jarkko Sakkinen wrote: > Call disable_interrupts() if we have to revert to polling in order not to > unnecessarily reserve the IRQ for the life-cycle of the driver. > > Cc: stable@...r.kernel.org # 4.5.x > Reported-by: Hans de Goede <hdegoede@...hat.com> > Fixes: e3837e74a06d ("tpm_tis: Refactor the interrupt setup") > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com> I can confirm that this fixes the "irq 31 nobody cared" oops for me: Tested-by: Hans de Goede <hdegoede@...hat.com> Regards, Hans > --- > drivers/char/tpm/tpm_tis_core.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c > index 27c6ca031e23..2435216bd10a 100644 > --- a/drivers/char/tpm/tpm_tis_core.c > +++ b/drivers/char/tpm/tpm_tis_core.c > @@ -433,6 +433,9 @@ static void disable_interrupts(struct tpm_chip *chip) > u32 intmask; > int rc; > > + if (priv->irq == 0) > + return; > + > rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask); > if (rc < 0) > intmask = 0; > @@ -1062,9 +1065,12 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, > if (irq) { > tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED, > irq); > - if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) > + if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { > dev_err(&chip->dev, FW_BUG > "TPM interrupt not working, polling instead\n"); > + > + disable_interrupts(chip); > + } > } else { > tpm_tis_probe_irq(chip, intmask); > } >
Powered by blists - more mailing lists