freebsd-dev/sys/compat
Konstantin Belousov 89b57fcf01 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
2007-11-05 11:36:16 +00:00
..
freebsd32 Rework the routines to convert a 5.x+ statfs structure (with fixed-size 2007-08-28 20:28:12 +00:00
ia32 Allow the ia32 resource limits (compat.ia32.max{dsiz,ssiz,vmem} to be 2007-09-24 20:49:39 +00:00
linprocfs Spelling fix for interupt -> interrupt 2007-10-12 06:03:46 +00:00
linsysfs Add a pn_destroy field to pfs_node. This field points to a destructor 2007-03-12 12:16:52 +00:00
linux Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
ndis Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
netbsd Start each of the license/copyright comments with /*- 2005-01-05 22:34:37 +00:00
opensolaris - Move crfree() outside MNT_ILOCK()/MNT_IUNLOCK() to eliminate a LOR: 2007-11-01 08:58:29 +00:00
pecoff Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00
svr4 Fix for the panic("vm_thread_new: kstack allocation failed") and 2007-11-05 11:36:16 +00:00