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
Tá an tiomantas seo le fáil i:
Saleel Kudchadker tiomanta 2024-07-03 18:57:23 -04:00
1 tuismitheoir 933b083360
tiomantas 6ac67afdd5
1 comhad athraithe
+1
+1
Féach ar an gComhad
@@ -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;