* [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
@ 2016-04-25 9:21 Jarkko Sakkinen
[not found] ` <1461576090-24813-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Sakkinen @ 2016-04-25 9:21 UTC (permalink / raw)
To: Peter Huewe
Cc: linux-security-module, Stefan Berger, Jarkko Sakkinen,
Marcel Selhorst, Jason Gunthorpe,
moderated list:TPM DEVICE DRIVER, open list
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm-chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index a12db8e..1965dc7 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -270,7 +270,8 @@ static void tpm_del_char_device(struct tpm_chip *chip)
/* Make the driver uncallable. */
down_write(&chip->ops_sem);
- tpm2_shutdown(chip, TPM2_SU_CLEAR);
+ if (chip->flags & TPM_CHIP_FLAG_TPM2)
+ tpm2_shutdown(chip, TPM2_SU_CLEAR);
chip->ops = NULL;
up_write(&chip->ops_sem);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
[not found] ` <1461576090-24813-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
@ 2016-04-25 17:57 ` Jason Gunthorpe
2016-04-25 18:48 ` Jarkko Sakkinen
[not found] ` <20160425175720.GB7675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
0 siblings, 2 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2016-04-25 17:57 UTC (permalink / raw)
To: Jarkko Sakkinen
Cc: open list, linux-security-module-u79uwXL29TY76Z2rM5mHXA,
moderated list:TPM DEVICE DRIVER
On Mon, Apr 25, 2016 at 12:21:30PM +0300, Jarkko Sakkinen wrote:
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Reported-by: Stefan Berger <stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> drivers/char/tpm/tpm-chip.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-By: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")
> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> index a12db8e..1965dc7 100644
> +++ b/drivers/char/tpm/tpm-chip.c
> @@ -270,7 +270,8 @@ static void tpm_del_char_device(struct tpm_chip *chip)
>
> /* Make the driver uncallable. */
> down_write(&chip->ops_sem);
> - tpm2_shutdown(chip, TPM2_SU_CLEAR);
> + if (chip->flags & TPM_CHIP_FLAG_TPM2)
> + tpm2_shutdown(chip, TPM2_SU_CLEAR);
> chip->ops = NULL;
> up_write(&chip->ops_sem);
> }
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
2016-04-25 17:57 ` Jason Gunthorpe
@ 2016-04-25 18:48 ` Jarkko Sakkinen
[not found] ` <20160425175720.GB7675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
1 sibling, 0 replies; 4+ messages in thread
From: Jarkko Sakkinen @ 2016-04-25 18:48 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Peter Huewe, linux-security-module, Stefan Berger,
Marcel Selhorst, moderated list:TPM DEVICE DRIVER, open list
On Mon, Apr 25, 2016 at 11:57:20AM -0600, Jason Gunthorpe wrote:
> On Mon, Apr 25, 2016 at 12:21:30PM +0300, Jarkko Sakkinen wrote:
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > drivers/char/tpm/tpm-chip.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")
Thanks and thanks for the fixes line (forgot to add it) :)
/Jarkko
> > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> > index a12db8e..1965dc7 100644
> > +++ b/drivers/char/tpm/tpm-chip.c
> > @@ -270,7 +270,8 @@ static void tpm_del_char_device(struct tpm_chip *chip)
> >
> > /* Make the driver uncallable. */
> > down_write(&chip->ops_sem);
> > - tpm2_shutdown(chip, TPM2_SU_CLEAR);
> > + if (chip->flags & TPM_CHIP_FLAG_TPM2)
> > + tpm2_shutdown(chip, TPM2_SU_CLEAR);
> > chip->ops = NULL;
> > up_write(&chip->ops_sem);
> > }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()
[not found] ` <20160425175720.GB7675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-04-25 19:09 ` Stefan Berger
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Berger @ 2016-04-25 19:09 UTC (permalink / raw)
To: Jason Gunthorpe, Jarkko Sakkinen
Cc: moderated list:TPM DEVICE DRIVER,
linux-security-module-u79uwXL29TY76Z2rM5mHXA, open list
On 04/25/2016 01:57 PM, Jason Gunthorpe wrote:
> On Mon, Apr 25, 2016 at 12:21:30PM +0300, Jarkko Sakkinen wrote:
>> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>> Reported-by: Stefan Berger <stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>> drivers/char/tpm/tpm-chip.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
> Reviewed-By: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")
Tested-by: Stefan Berger <stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-25 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 9:21 [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown() Jarkko Sakkinen
[not found] ` <1461576090-24813-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-25 17:57 ` Jason Gunthorpe
2016-04-25 18:48 ` Jarkko Sakkinen
[not found] ` <20160425175720.GB7675-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-25 19:09 ` Stefan Berger
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).