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/vfs/request.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/kernel/vfs/request.c') diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 0a377d3..a129f2e 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -64,6 +64,7 @@ void vfsreq_finish(struct vfs_request *req, char __user *stored, long ret, // TODO write tests for caller getting killed while opening a file if (!req->caller) panic_unimplemented(); ret = process_handle_put(req->caller, h); + if (ret < 0) ret = -EMFILE; } else { ret = -1; } -- cgit v1.2.3