Re: [PATCH v8 08/11] tpm, tpm: Implement usage counter for locality
From: Lino Sanfilippo
Date: Tue Oct 18 2022 - 03:43:07 EST
On 18.10.22 08:25, Lukas Wunner wrote:
> Hm, any reason not to use struct kref for the locality counter?
> Provides correct memory ordering (no mutex needed) and allows for
> calling a release function too upon reaching 0.
>
I already tried this but krefs turned out to be not very usable
in this case. See my post here:
https://lore.kernel.org/lkml/09eefdab-f677-864a-99f7-869d7a8744c2@xxxxxx/
Regards,
Lino