[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCZgK2uyzn/qPg6L@kernel.org>
Date: Fri, 12 Feb 2021 13:02:03 +0200
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Lino Sanfilippo <l.sanfilippo@...bus.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Lino Sanfilippo <LinoSanfilippo@....de>, peterhuewe@....de,
stefanb@...ux.vnet.ibm.com, stable@...r.kernel.org,
linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
seanjc@...gle.com
Subject: Re: [PATCH v3 2/2] tpm: in tpm2_del_space check if ops pointer is
still valid
On Tue, Feb 09, 2021 at 09:36:53AM -0400, Jason Gunthorpe wrote:
> On Tue, Feb 09, 2021 at 12:52:17PM +0100, Lino Sanfilippo wrote:
> > > @@ -640,8 +643,10 @@ void tpm_chip_unregister(struct tpm_chip *chip)
> > > if (IS_ENABLED(CONFIG_HW_RANDOM_TPM))
> > > hwrng_unregister(&chip->hwrng);
> > > tpm_bios_log_teardown(chip);
> > > - if (chip->flags & TPM_CHIP_FLAG_TPM2)
> > > + if (chip->flags & TPM_CHIP_FLAG_TPM2) {
> > > cdev_device_del(&chip->cdevs, &chip->devs);
> > > + put_device(&chip->devs);
> > > + }
> > > tpm_del_char_device(chip);
> > > }
> > > EXPORT_SYMBOL_GPL(tpm_chip_unregister);
> > >
> >
> > I tested the solution you scetched and it fixes the issue for me. Will you send a (real) patch for this?
>
> No, feel free to bundle this up with any fixes needed and send it with
> a Signed-off-by from both of us
>
> I did it pretty fast so it will need a careful read that there isn't a
> typo
>
> Thanks,
> Jason
Let's use CDB too as it exist and Sean kindly provided a better
documentation for it in some recent kernel release. It's great
exactly for this type of situation.
/Jarkko
Powered by blists - more mailing lists