Re: [PATCH v2 0/2] MR10271: Fixed thread safety issues with NtUserRegistClassExWOW and NtUserUnregisterClass.
On Mon Mar 23 13:43:49 2026 +0000, Rémi Bernon wrote:
I don't think that's true? With the new user_lock scope, class creation and insertion in the process linked list happens atomically. Symmetrically, class destruction and removal from the process class list also happens atomically. So only scenario that `find_shared_session_object` can fail, is some general critical error. I don't think we care that much about what happens in that case, but it seems to me that class pointer is exclusively owned by the calling thread in all case until the class is inserted in the process list and user critical section exited, and the pointer can and should always be freed on error. Yes, you are right, with the new user_lock scope, only some critical error can cause find_shared_session_object failed, in that case, we should destroy the class, I will fixed it.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10271#note_133474
participants (1)
-
Yongjie Yao (@yaoyongjie)