]> git.proxmox.com Git - swtpm.git/commitdiff
swtpm: Do 300 locking retries instead of only 100
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 15 Sep 2022 16:36:32 +0000 (12:36 -0400)
committerStefan Berger <stefanb@us.ibm.com>
Tue, 20 Sep 2022 17:00:34 +0000 (13:00 -0400)
Increase the number of locking retries to 300 over 3 seconds
instead of 100 over 1 second. This gives the failing side more
time to release the lock.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
src/swtpm/cuse_tpm.c
src/swtpm/mainloop.h

index d979286a303fada2bdb6e177f3a5d46faa706742..1228858932a88d349d8a0ef1b752d703940db197 100644 (file)
@@ -128,7 +128,7 @@ static bool g_release_lock_outgoing;
 /* how many times to retry locking; use for fallback after releasing
    the lock on outgoing migration. */
 static unsigned int g_locking_retries;
-#define DEFAULT_LOCKING_RETRIES  100
+#define DEFAULT_LOCKING_RETRIES  300 /* 300 * 10ms */
 
 #if GLIB_MAJOR_VERSION >= 2
 # if GLIB_MINOR_VERSION >= 32
index a14a8aa0211a390f09ac38603a2389ef02ac747c..51b89a5cfe969990efc3a509b82d3b39a44d6fe6 100644 (file)
@@ -71,7 +71,7 @@ struct mainLoopParams {
     /* how many times to retry locking; use for fallback after releasing
        the lock on outgoing migration. */
     unsigned int locking_retries;
-#define DEFAULT_LOCKING_RETRIES  100
+#define DEFAULT_LOCKING_RETRIES  300 /* 300 * 10ms */
 };
 
 int mainLoop(struct mainLoopParams *mlp,