Module: wine Branch: master Commit: 56d56ec6295d43ed076a327f0bae1ee8af5a0663 URL: https://gitlab.winehq.org/wine/wine/-/commit/56d56ec6295d43ed076a327f0bae1ee...
Author: Paul Gofman pgofman@codeweavers.com Date: Thu Sep 21 16:23:33 2023 -0600
ntdll: Remove entries from queue in RtlWakeAddressAll().
---
dlls/ntdll/sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index a764d2afc09..495514a1298 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -916,8 +916,8 @@ NTSTATUS WINAPI RtlWaitOnAddress( const void *addr, const void *cmp, SIZE_T size void WINAPI RtlWakeAddressAll( const void *addr ) { struct futex_queue *queue = get_futex_queue( addr ); + struct futex_entry *entry, *next; unsigned int count = 0, i; - struct futex_entry *entry; DWORD tids[256];
TRACE("%p\n", addr); @@ -929,10 +929,12 @@ void WINAPI RtlWakeAddressAll( const void *addr ) if (!queue->queue.next) list_init(&queue->queue);
- LIST_FOR_EACH_ENTRY( entry, &queue->queue, struct futex_entry, entry ) + LIST_FOR_EACH_ENTRY_SAFE( entry, next, &queue->queue, struct futex_entry, entry ) { if (entry->addr == addr) { + entry->addr = NULL; + list_remove( &entry->entry ); /* Try to buffer wakes, so that we don't make a system call while * holding a spinlock. */ if (count < ARRAY_SIZE(tids))