Re: [PATCH v2 1/3] tpm: fix reference counting for struct tpm_chip

2021-02-03 Thread Jarkko Sakkinen
On Wed, Feb 03, 2021 at 03:06:30PM +0100, Lino Sanfilippo wrote: > Hi, > > > On 03.02.21 02:09, Jarkko Sakkinen wrote: > > On Tue, Feb 02, 2021 at 11:09:01PM +0100, Lino Sanfilippo wrote: > >> From: Lino Sanfilippo > >> > >> The following sequence of operations > >> > >> 1. open device /dev/tpmr

Re: [PATCH v2 1/3] tpm: fix reference counting for struct tpm_chip

2021-02-03 Thread Lino Sanfilippo
Hi, On 03.02.21 02:09, Jarkko Sakkinen wrote: > On Tue, Feb 02, 2021 at 11:09:01PM +0100, Lino Sanfilippo wrote: >> From: Lino Sanfilippo >> >> The following sequence of operations >> >> 1. open device /dev/tpmrm >> 2. remove the registered tpm chip driver > > What is "tpm chip driver"? Please

Re: [PATCH v2 1/3] tpm: fix reference counting for struct tpm_chip

2021-02-02 Thread Jarkko Sakkinen
On Tue, Feb 02, 2021 at 11:09:01PM +0100, Lino Sanfilippo wrote: > From: Lino Sanfilippo > > The following sequence of operations > > 1. open device /dev/tpmrm > 2. remove the registered tpm chip driver What is "tpm chip driver"? Please just refer to the exact thing (e.g. tpm_tis_spi is the one

[PATCH v2 1/3] tpm: fix reference counting for struct tpm_chip

2021-02-02 Thread Lino Sanfilippo
From: Lino Sanfilippo The following sequence of operations 1. open device /dev/tpmrm 2. remove the registered tpm chip driver 3. perform a write() to /dev/tpmrm results in a refcount warning: [ cut here ] WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0/0