Re: [PATCH][RFC] tpm: Rework open/close/shutdown to avoid races

2020-12-08 Thread Jarkko Sakkinen
On Fri, Dec 04, 2020 at 01:18:05PM +0300, Sergey Temerkhanov wrote: > Avoid race condition at shutdown by shutting downn the TPM 2.0 > devices synchronously. This eliminates the condition when the > shutdown sequence sets chip->ops to NULL leading to the following: > > [ 1586.593561][ T8669] tpm2_

Re: [PATCH][RFC] tpm: Rework open/close/shutdown to avoid races

2020-12-04 Thread Jason Gunthorpe
On Fri, Dec 04, 2020 at 01:18:05PM +0300, Sergey Temerkhanov wrote: > Avoid race condition at shutdown by shutting downn the TPM 2.0 > devices synchronously. This eliminates the condition when the > shutdown sequence sets chip->ops to NULL leading to the following: > > [ 1586.593561][ T8669] tpm2_

[PATCH][RFC] tpm: Rework open/close/shutdown to avoid races

2020-12-04 Thread Sergey Temerkhanov
Avoid race condition at shutdown by shutting downn the TPM 2.0 devices synchronously. This eliminates the condition when the shutdown sequence sets chip->ops to NULL leading to the following: [ 1586.593561][ T8669] tpm2_del_space+0x28/0x73 [ 1586.598718][ T8669] tpmrm_release+0x27/0x33wq [ 1586.60