public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e94c575
)
process: Correct handling of out of processes case
author
Alan Cox
<alan@linux.intel.com>
Thu, 18 Dec 2014 23:17:04 +0000
(23:17 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Thu, 18 Dec 2014 23:17:04 +0000
(23:17 +0000)
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
patch
|
blob
|
history
diff --git
a/Kernel/process.c
b/Kernel/process.c
index
cdebd25
..
ff8f4e3
100644
(file)
--- 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)