1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 15:35:06 +00:00

Kernel: Protect FramebufferDevice with spinlock instead of mutex

This commit is contained in:
Andreas Kling 2022-02-03 15:33:29 +01:00
parent ddde9e7ee5
commit ca42621be1
5 changed files with 18 additions and 19 deletions

View file

@ -124,7 +124,7 @@ ErrorOr<void> GenericFramebufferDevice::ioctl(OpenFileDescription&, unsigned req
auto flush_rects = TRY(copy_typed_from_user(user_flush_rects));
if (Checked<unsigned>::multiplication_would_overflow(flush_rects.count, sizeof(FBRect)))
return Error::from_errno(EFAULT);
MutexLocker locker(m_flushing_lock);
SpinlockLocker locker(m_flushing_lock);
if (flush_rects.count > 0) {
for (unsigned i = 0; i < flush_rects.count; i++) {
FBRect user_dirty_rect;