From 462907828d7a2e85de1caa68d1fbaded015ac1e9 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Fri, 25 Oct 2024 01:00:58 +0300 Subject: [PATCH] linux: Remove redundant SwapPT in linux_getrandom() --- syscalls/linux.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/syscalls/linux.cpp b/syscalls/linux.cpp index 8889b654..3ec9d9ae 100644 --- a/syscalls/linux.cpp +++ b/syscalls/linux.cpp @@ -3336,10 +3336,7 @@ static ssize_t linux_getrandom(SysFrm *, void *buf, for (size_t i = 0; i < buflen; i++) { random = Random::rand16(); - { - Memory::SwapPT swap(pcb->PageTable); - ((uint8_t *)pBuf)[i] = uint8_t(random & 0xFF); - } + ((uint8_t *)pBuf)[i] = uint8_t(random & 0xFF); } return buflen; }