Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip

2021-02-19 Thread Jarkko Sakkinen
On Thu, Feb 18, 2021 at 08:13:57PM +0100, Lino Sanfilippo wrote: > > Hi, > > On 17.02.21 at 23:18, Jarkko Sakkinen wrote: > > >> + > > > > /* > > * Please describe what the heck the function does. No need for full on > > * kdoc. > > */ > > Ok. > > >> +int tpm2_add_device(struct tpm_chip *ch

Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip

2021-02-18 Thread Lino Sanfilippo
Hi, On 17.02.21 at 23:18, Jarkko Sakkinen wrote: >> + > > /* > * Please describe what the heck the function does. No need for full on > * kdoc. > */ Ok. >> +int tpm2_add_device(struct tpm_chip *chip) > > Please, rename as tpm_devs_add for coherency sake. > Sorry I confused this and rename

Re: [PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip

2021-02-17 Thread Jarkko Sakkinen
On Tue, Feb 16, 2021 at 08:53:11PM +0100, Lino Sanfilippo wrote: > From: Lino Sanfilippo > > The following sequence of operations results in a refcount warning: > > 1. Open device /dev/tpmrm. > 2. Remove module tpm_tis_spi. > 3. Write a TPM command to the file descriptor opened at step 1. > > -

[PATCH RESEND v5] tpm: fix reference counting for struct tpm_chip

2021-02-16 Thread Lino Sanfilippo
From: Lino Sanfilippo The following sequence of operations results in a refcount warning: 1. Open device /dev/tpmrm. 2. Remove module tpm_tis_spi. 3. Write a TPM command to the file descriptor opened at step 1. [ cut here ] WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25