diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2007-11-05 11:36:16 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2007-11-05 11:36:16 +0000 |
commit | 89b57fcf01d895a82a24b97548116e924bca5efc (patch) | |
tree | cccec36134d2cab5ce1eabb67dcaab5981e9beb0 /Makefile.inc1 | |
parent | 762d6411cf512409e42fe8c66aa54c8975725f76 (diff) | |
download | src-89b57fcf01d895a82a24b97548116e924bca5efc.tar.gz src-89b57fcf01d895a82a24b97548116e924bca5efc.zip |
Fix for the panic("vm_thread_new: kstack allocation failed") and
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
Notes
Notes:
svn path=/head/; revision=173361
Diffstat (limited to 'Makefile.inc1')
0 files changed, 0 insertions, 0 deletions