Kernel: Add missing locking when registering VMObjectDeletedHandlers

This commit is contained in:
Andreas Kling 2021-07-25 16:59:51 +02:00
parent 09bc4cee15
commit 25a5fd870c
Notes: sideshowbarker 2024-07-18 08:21:56 +09:00

View file

@ -67,10 +67,12 @@ public:
void register_on_deleted_handler(VMObjectDeletedHandler& handler)
{
ScopedSpinLock locker(m_on_deleted_lock);
m_on_deleted.set(&handler);
}
void unregister_on_deleted_handler(VMObjectDeletedHandler& handler)
{
ScopedSpinLock locker(m_on_deleted_lock);
m_on_deleted.remove(&handler);
}