From 06affde06e2b1d3fe9c7c3fa60f5662e9957534d Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 8 Oct 2022 16:09:04 +0200 Subject: syscall/open: don't check for free handles doesn't really prevent anything, and makes it harder to test edge cases --- src/kernel/syscalls.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 1909eb7..6800138 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -86,9 +86,8 @@ handle_t _syscall_open(const char __user *path, long len, int flags) { if (PATH_MAX < len) SYSCALL_RETURN(-1); - // TODO remove this check - it's not worth it w/ threads - if (process_find_free_handle(process_current, 0) < 0) - SYSCALL_RETURN(-EMFILE); + /* Doesn't check for free handles. Another thread could use up all + * handles in the meantime anyways, or free some up. */ path_buf = kmalloc(len); if (!path_buf) goto fail; -- cgit v1.2.3