[libvirt] [PATCH v5 07/20] tpm: Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c

Stefan Berger stefanb at linux.ibm.com
Thu Jul 25 01:02:49 UTC 2019


On 7/24/19 12:55 PM, Daniel P. Berrangé wrote:

>> This isn't a thread safe initialization process.
>>
>> Use VIR_ONCE_GLOBAL_INIT to declare the initializer
>> funtion, then just unconditionally invoke the
>> initializer here. This is then guaranteed to be
>> called only once with no race possible


As you noticed I am intending to call the initialization function 
searching for the executables multiple times. I have now added the lock 
to this patch here.

    Stefan




More information about the libvir-list mailing list