From bbb3b5d8b133e4da3f0add37387dc0b46b78df94 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 13 Dec 2023 12:48:51 +0100 Subject: [PATCH] module-pipe-tunnel: avoid bitfield data race Move the have_sync bitfield away from the other bitfields because they are written from different threads and might cause a data race. Fixes #3706 --- src/modules/module-pipe-tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-pipe-tunnel.c b/src/modules/module-pipe-tunnel.c index 0fce7eb83..4acc98c0c 100644 --- a/src/modules/module-pipe-tunnel.c +++ b/src/modules/module-pipe-tunnel.c @@ -187,7 +187,6 @@ struct impl { unsigned int do_disconnect:1; unsigned int driving:1; - unsigned int have_sync:1; unsigned int may_pause:1; unsigned int paused:1; @@ -203,6 +202,7 @@ struct impl { float corr; uint64_t next_time; + unsigned int have_sync:1; }; static uint64_t get_time_ns(struct impl *impl)