89b57fcf01
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit() when the kmem_alloc_nofault() failed to allocate address space. Both functions now return error instead of panicing or dereferencing NULL. As consequence, vmspace_exec() and vmspace_unshare() returns the errno int. struct vmspace arg was added to vm_forkproc() to avoid dealing with failed allocation when most of the fork1() job is already done. The kernel stack for the thread is now set up in the thread_alloc(), that itself may return NULL. Also, allocation of the first process thread is performed in the fork1() to properly deal with stack allocation failure. proc_linkup() is separated into proc_linkup() called from fork1(), and proc_linkup0(), that is used to set up the kernel process (was known as swapper). In collaboration with: Peter Holm Reviewed by: jhb |
||
---|---|---|
.. | ||
crb_machdep.c | ||
files.crb | ||
files.i81342 | ||
i81342_mcu.c | ||
i81342_pci.c | ||
i81342_space.c | ||
i81342.c | ||
i81342reg.h | ||
i81342var.h | ||
iq81342_7seg.c | ||
iq81342reg.h | ||
iq81342var.h | ||
obio_space.c | ||
obio.c | ||
obiovar.h | ||
std.crb | ||
std.i81342 | ||
uart_bus_i81342.c | ||
uart_cpu_i81342.c |