[libvirt PATCH v2 06/12] util: ensure all TPM global vars access is protected by lock

Ján Tomko jtomko at redhat.com
Thu Nov 25 13:13:49 UTC 2021


On a Wednesday in 2021, Daniel P. Berrangé wrote:
>The virTPMEmulatorInit method updates various global variables
>and holds a lock while doing so. Other methods which access
>these variables, however, don't reliably hold locks over all
>of their accesses.
>
>Since virTPMEmulatorInit is no longer exported, we can push
>the locking up into all the callers and achieve proper safety
>for concurrent usage.
>
>Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
>---
> src/util/virtpm.c | 42 ++++++++++++++++++++++--------------------
> 1 file changed, 22 insertions(+), 20 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211125/9945c6d2/attachment-0001.sig>


More information about the libvir-list mailing list