1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel/Graphics: Protect the list of display connectors with a Spinlock

This list could be updated in runtime if an hotplug event occurs, so we
must protect it with a spin lock to avoid corruption of the list.
This commit is contained in:
Liav A 2022-05-06 14:46:58 +03:00 committed by Linus Groh
parent c246d86867
commit b8493bf70f
2 changed files with 15 additions and 9 deletions

View file

@ -58,7 +58,7 @@ private:
RefPtr<VGACompatibleAdapter> m_vga_adapter;
unsigned m_current_minor_number { 0 };
IntrusiveList<&DisplayConnector::m_list_node> m_display_connector_nodes;
SpinlockProtected<IntrusiveList<&DisplayConnector::m_list_node>> m_display_connector_nodes;
RecursiveSpinlock m_main_vga_lock;
bool m_vga_access_is_disabled { false };