From b9aa0dc3b397e3a5e7b59bf77bd6a551e07a8c75 Mon Sep 17 00:00:00 2001 From: nmzik Date: Wed, 5 Aug 2026 02:25:05 +0200 Subject: [PATCH] fix KernelLseek lock leak Co-authored-by: Stefanos Costa --- src/kernel/fileSystem.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/kernel/fileSystem.cpp b/src/kernel/fileSystem.cpp index b7cd0200e..8b5b98b4b 100644 --- a/src/kernel/fileSystem.cpp +++ b/src/kernel/fileSystem.cpp @@ -803,7 +803,7 @@ int64_t KYTY_SYSV_ABI KernelLseek(int d, int64_t offset, int whence) { return KERNEL_ERROR_ESPIPE; } - file->mutex.Lock(); + Common::LockGuard lock(file->mutex); bool is_invalid = file->f.IsInvalid(); @@ -828,8 +828,6 @@ int64_t KYTY_SYSV_ABI KernelLseek(int d, int64_t offset, int whence) { EXIT_IF(pos != offset); - file->mutex.Unlock(); - if (is_invalid) { LOGF("\tfile is invalid\n"); return KERNEL_ERROR_EIO;