mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: fix cache invalidation of swtpm capabilities
The check for whether the swtpm binary was modified is checking pointers to the mtime field in two distinct structs, so will always compare different. This resulted in re-probing swtpm capabilities every time, as many as 20 times for a single VM launch. Fixes: commit 01cf7a1bb9f1da27ad8bcbaa82c4f7a948c6a793 Author: Stefan Berger <stefanb@us.ibm.com> Date: Thu Jul 25 14:22:04 2019 -0400 tpm: Check whether previously found executables were updated Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
4f08dfa5f4
commit
e18fff6c85
@ -301,7 +301,7 @@ virTPMEmulatorInit(void)
|
||||
findit = true;
|
||||
|
||||
if (!findit &&
|
||||
&statbuf.st_mtime != &prgs[i].stat->st_mtime)
|
||||
statbuf.st_mtime != prgs[i].stat->st_mtime)
|
||||
findit = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user