Re: [PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-14 Thread Jarkko Sakkinen
On Wed, Apr 13, 2016 at 11:11:27AM -0600, Jason Gunthorpe wrote: > On Wed, Apr 13, 2016 at 10:22:06AM +0300, Jarkko Sakkinen wrote: > > rmmod crashes the driver because tpm_chip_unregister() already sets ops > > to NULL. This commit fixes the issue by moving tpm2_shutdown() to > >

Re: [PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-14 Thread Jarkko Sakkinen
On Wed, Apr 13, 2016 at 11:11:27AM -0600, Jason Gunthorpe wrote: > On Wed, Apr 13, 2016 at 10:22:06AM +0300, Jarkko Sakkinen wrote: > > rmmod crashes the driver because tpm_chip_unregister() already sets ops > > to NULL. This commit fixes the issue by moving tpm2_shutdown() to > >

Re: [PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-13 Thread Jason Gunthorpe
On Wed, Apr 13, 2016 at 10:22:06AM +0300, Jarkko Sakkinen wrote: > rmmod crashes the driver because tpm_chip_unregister() already sets ops > to NULL. This commit fixes the issue by moving tpm2_shutdown() to > tpm_chip_unregister(). This commit is also cleanup because it removes > duplicate code

Re: [PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-13 Thread Jason Gunthorpe
On Wed, Apr 13, 2016 at 10:22:06AM +0300, Jarkko Sakkinen wrote: > rmmod crashes the driver because tpm_chip_unregister() already sets ops > to NULL. This commit fixes the issue by moving tpm2_shutdown() to > tpm_chip_unregister(). This commit is also cleanup because it removes > duplicate code

[PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-13 Thread Jarkko Sakkinen
rmmod crashes the driver because tpm_chip_unregister() already sets ops to NULL. This commit fixes the issue by moving tpm2_shutdown() to tpm_chip_unregister(). This commit is also cleanup because it removes duplicate code from tpm_crb and tpm_tis to the core. v2: make sending shutdown command

[PATCH v3] tpm: fix crash in tpm_tis deinitialization

2016-04-13 Thread Jarkko Sakkinen
rmmod crashes the driver because tpm_chip_unregister() already sets ops to NULL. This commit fixes the issue by moving tpm2_shutdown() to tpm_chip_unregister(). This commit is also cleanup because it removes duplicate code from tpm_crb and tpm_tis to the core. v2: make sending shutdown command