SWDEV-465602 - Fix random segfault
- Introduce a lock when checking isUserObjectValid. We need a lock
here as one can remove the userObject T2, leading to buffer overflow
when checking ranges in T1.
Change-Id: I058144b8cc463c90ab6bf5cf96bf937897742917
[ROCm/clr commit: 6ac67afdd5]
This commit is contained in:
@@ -88,6 +88,7 @@ struct UserObject : public amd::ReferenceCountedObject {
|
||||
}
|
||||
|
||||
static bool isUserObjvalid(UserObject* pUsertObj) {
|
||||
amd::ScopedLock lock(UserObjectLock_);
|
||||
auto it = ObjectSet_.find(pUsertObj);
|
||||
if (it == ObjectSet_.end()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user