From 6137df2e8bba2c3d2b7f5392a1d78babda4564f8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 20 Jan 2019 00:49:36 +0000 Subject: [PATCH] syscall_exec32: report ENOMEM properly for outsized binaries --- Kernel/syscall_exec32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kernel/syscall_exec32.c b/Kernel/syscall_exec32.c index 688f1e7a..abcdffb2 100644 --- a/Kernel/syscall_exec32.c +++ b/Kernel/syscall_exec32.c @@ -182,7 +182,8 @@ arg_t _execve(void) /* This must be the last test as it makes changes if it works */ /* FIXME: need to update this to support split code/data and to fix stack handling nicely */ - if (pagemap_realloc(0, bin_size, 0)) + /* FIXME: ENOMEM fix needs to go to 16bit ? */ + if ((udata.u_error = pagemap_realloc(0, bin_size, 0)) != 0) goto nogood3; /* Core dump and ptrace permission logic */ -- 2.34.1