[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190208175946.GA4195@linux.intel.com>
Date: Fri, 8 Feb 2019 19:59:46 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Stefan Berger <stefanb@...ux.ibm.com>
Cc: linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
Peter Huewe <PeterHuewe@....de>,
Jason Gunthorpe <jgg@...pe.ca>,
Stefan Berger <stefanb@...ux.vnet.ibm.com>,
Alexander Steffen <Alexander.Steffen@...ineon.com>,
stable@...r.kernel.org
Subject: Re: [PATCH v3 1/2] tpm: Unify the send callback behaviour
On Fri, Feb 08, 2019 at 11:36:19AM -0500, Stefan Berger wrote:
> On 2/8/19 11:30 AM, Jarkko Sakkinen wrote:
> > static void tpm_nsc_cancel(struct tpm_chip *chip)
> > diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> > index 60e2038652b8..1d781c19f112 100644
> > --- a/drivers/char/tpm/tpm_tis_core.c
> > +++ b/drivers/char/tpm/tpm_tis_core.c
> > @@ -507,7 +507,11 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
> > if (!priv->irq_tested)
> > disable_interrupts(chip);
> > priv->irq_tested = true;
> > - return rc;
> > +
> > + if (rc < 0)
> > + return rc;
> > +
> > + return 0;
> > }
>
>
> That's not all... There's this above it as well with tpm_tis_send_main
> returning with 'return len;'.
>
> if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested)
> return tpm_tis_send_main(chip, buf, len);
OK, looks like that your suggestion to do it in *_main() was correct
after all.
/Jarkko
Powered by blists - more mailing lists