From e11ba16254ed5e87dfaf4977f5602c1b706ee4fb Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 18 Dec 2014 23:17:04 +0000 Subject: [PATCH] process: Correct handling of out of processes case When the error handling was updated this path was broken. With this fixed running out of memory/swap now correctly fails with ENOMEM --- Kernel/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/process.c b/Kernel/process.c index cdebd25e..ff8f4e3c 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -271,8 +271,10 @@ ptptr ptab_alloc(void) if (pagemap_alloc(newp) == 0) { newp->p_status = P_FORKING; nproc++; - } else + } else { udata.u_error = ENOMEM; + newp = NULL; + } } irqrestore(irq); if (newp) -- 2.34.1