udebug: fix issue with snapshot of remote ring
authorFelix Fietkau <[email protected]>
Wed, 23 Jul 2025 09:49:27 +0000 (11:49 +0200)
committerFelix Fietkau <[email protected]>
Wed, 23 Jul 2025 09:49:47 +0000 (11:49 +0200)
Avoid skipping over the current ring head

Signed-off-by: Felix Fietkau <[email protected]>
udebug-remote.c

index d4d9ed5812d5d86b9258d2c1e8fdedb53b9aac63..7fa0b3a322211f41bd548732a2ac30cebb4eeeb0 100644 (file)
@@ -134,6 +134,9 @@ rbuf_advance_read_head(struct udebug_remote_buf *rb, uint32_t head,
                        __sync_synchronize();
                }
 
+               if (rb->head == head)
+                       break;
+
                if (ptr->timestamp > last_ptr->timestamp)
                        continue;