SWDEV-496106 - Use lock_ops to avoid race condition in safe_stream.

Change-Id: I5e98c34a41434e2f7d2e6406ea30ddcf01b1091c
This commit is contained in:
kjayapra-amd
2024-11-22 10:47:12 -05:00
committed by Karthik Jayaprakash
szülő 25a893658a
commit 39b64b57d9
@@ -261,6 +261,7 @@ class MemoryPool : public amd::ReferenceCountedObject {
/// Add a safe stream for quick looks-ups if event dependencies option is enabled
void AddSafeStream(Stream* event_stream, Stream* wait_stream) {
amd::ScopedLock lock(lock_pool_ops_);
if (EventDependencies()) {
free_heap_.AddSafeStream(event_stream, wait_stream);
}