SWDEV-485866 - Return OOM if stream creation fails due to insufficient memory.

Change-Id: I4e57ecc81921bde274bb6a4e0890f0fc6a17955a


[ROCm/clr commit: 5ccc140e1b]
This commit is contained in:
Jaydeep Patel authored and Jaydeepkumar Patel committed 2024-10-10 00:44:54 -04:00
1 parent da59165313
commit 7983801b0c
4 files changed
+11 -3

No files matched your search

+4
View File
@@ -36,6 +36,10 @@ hip::Stream* Device::NullStream(bool wait) {
amd::ScopedLock lock(lock_);
if (null_stream_ == nullptr) {
null_stream_ = new Stream(this, Stream::Priority::Normal, 0, true);
// Stream creation might be failed from rcor and in that case, vdev is null.
if (null_stream_->vdev() == nullptr) {
Stream::Destroy(null_stream_);
}
}
}
if (null_stream_ == nullptr) {