diff --git a/opencl/source/command_queue/command_queue_hw_base.inl b/opencl/source/command_queue/command_queue_hw_base.inl index a262ed66f5..03b5d65831 100644 --- a/opencl/source/command_queue/command_queue_hw_base.inl +++ b/opencl/source/command_queue/command_queue_hw_base.inl @@ -172,6 +172,7 @@ bool CommandQueueHw::waitForTimestamps(Range copyEngine bool waited = false; if (isWaitForTimestampsEnabled()) { + TakeOwnershipWrapper queueOwnership(*this); waited = waitForTimestampsWithinContainer(mainContainer, getGpgpuCommandStreamReceiver(), status); if (waited) { diff --git a/shared/source/utilities/tag_allocator.inl b/shared/source/utilities/tag_allocator.inl index 4db1d542f0..94e528e0bd 100644 --- a/shared/source/utilities/tag_allocator.inl +++ b/shared/source/utilities/tag_allocator.inl @@ -15,6 +15,7 @@ template TagAllocator::TagAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, MemoryManager *memMngr, size_t tagCount, size_t tagAlignment, size_t tagSize, bool doNotReleaseNodes, DeviceBitfield deviceBitfield) : TagAllocatorBase(rootDeviceIndices, memMngr, tagCount, tagAlignment, tagSize, doNotReleaseNodes, deviceBitfield) { + std::unique_lock lock(allocatorMutex); populateFreeTags(); }