Jinoh Kang (@iamahuman) commented about dlls/win32u/winstation.c:
+ unsigned int status; + HANDLE handle; + + session->ref = 1; + + InitializeObjectAttributes( &attr, &name, 0, NULL, NULL ); + if (!(status = NtOpenSection( &handle, SECTION_MAP_READ | SECTION_QUERY, &attr ))) + { + SECTION_BASIC_INFORMATION info; + + if (!(status = NtQuerySection( handle, SectionBasicInformation, &info, sizeof(info), NULL ))) + { + SIZE_T size = info.Size.QuadPart; + status = NtMapViewOfSection( handle, GetCurrentProcess(), (void **)&session->shared, + 0, 0, NULL, &size, ViewUnmap, 0, PAGE_READONLY ); + } This will race (between NtQuerySection and NtMapViewOfSection) if the mapping grows in the meantime.
This should loop until `NtMapViewOfSection` no longer returns `STATUS_INVALID_PARAMETER`. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_62040