cvs commit: src/sys/amd64/amd64 machdep.c pmap.c src/sys/arm/arm
pmap.c src/sys/arm/at91 kb920x_machdep.c src/sys/arm/sa11x0
assabet_machdep.c src/sys/arm/xscale/i80321 ep80219_machdep.c
iq31244_machdep.c src/sys/arm/xscale/i8134x crb_machdep.c ...
Konstantin Belousov
kib at FreeBSD.org
Mon Nov 5 03:36:17 PST 2007
kib 2007-11-05 11:36:17 UTC
FreeBSD src repository
Modified files:
sys/amd64/amd64 machdep.c pmap.c
sys/arm/arm pmap.c
sys/arm/at91 kb920x_machdep.c
sys/arm/sa11x0 assabet_machdep.c
sys/arm/xscale/i80321 ep80219_machdep.c iq31244_machdep.c
sys/arm/xscale/i8134x crb_machdep.c
sys/arm/xscale/ixp425 avila_machdep.c
sys/compat/pecoff imgact_pecoff.c
sys/compat/svr4 imgact_svr4.c
sys/i386/i386 machdep.c pmap.c
sys/i386/ibcs2 imgact_coff.c
sys/i386/linux imgact_linux.c
sys/ia64/ia64 machdep.c pmap.c
sys/kern imgact_aout.c imgact_elf.c imgact_gzip.c
kern_exec.c kern_fork.c kern_kse.c
kern_proc.c kern_sig.c kern_thr.c
kern_thread.c
sys/pc98/pc98 machdep.c
sys/powerpc/powerpc machdep.c pmap_dispatch.c
sys/sparc64/sparc64 machdep.c pmap.c
sys/sun4v/sun4v machdep.c pmap.c
sys/sys proc.h signalvar.h
sys/vm pmap.h vm_extern.h vm_glue.c vm_map.c
Log:
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
Revision Changes Path
1.677 +1 -1 src/sys/amd64/amd64/machdep.c
1.592 +3 -1 src/sys/amd64/amd64/pmap.c
1.88 +2 -1 src/sys/arm/arm/pmap.c
1.27 +1 -1 src/sys/arm/at91/kb920x_machdep.c
1.22 +1 -1 src/sys/arm/sa11x0/assabet_machdep.c
1.8 +1 -1 src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 +1 -1 src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 +1 -1 src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 +1 -1 src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 +5 -1 src/sys/compat/pecoff/imgact_pecoff.c
1.26 +3 -1 src/sys/compat/svr4/imgact_svr4.c
1.660 +1 -1 src/sys/i386/i386/machdep.c
1.596 +8 -1 src/sys/i386/i386/pmap.c
1.68 +3 -1 src/sys/i386/ibcs2/imgact_coff.c
1.56 +3 -1 src/sys/i386/linux/imgact_linux.c
1.226 +1 -1 src/sys/ia64/ia64/machdep.c
1.192 +2 -1 src/sys/ia64/ia64/pmap.c
1.102 +3 -1 src/sys/kern/imgact_aout.c
1.179 +3 -1 src/sys/kern/imgact_elf.c
1.56 +5 -1 src/sys/kern/imgact_gzip.c
1.310 +3 -1 src/sys/kern/kern_exec.c
1.287 +34 -7 src/sys/kern/kern_fork.c
1.236 +30 -13 src/sys/kern/kern_kse.c
1.253 +13 -15 src/sys/kern/kern_proc.c
1.352 +1 -1 src/sys/kern/kern_sig.c
1.63 +2 -0 src/sys/kern/kern_thr.c
1.257 +22 -5 src/sys/kern/kern_thread.c
1.397 +1 -1 src/sys/pc98/pc98/machdep.c
1.104 +1 -1 src/sys/powerpc/powerpc/machdep.c
1.10 +2 -1 src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 +1 -1 src/sys/sparc64/sparc64/machdep.c
1.167 +6 -1 src/sys/sparc64/sparc64/pmap.c
1.16 +1 -1 src/sys/sun4v/sun4v/machdep.c
1.40 +2 -1 src/sys/sun4v/sun4v/pmap.c
1.493 +1 -0 src/sys/sys/proc.h
1.78 +1 -0 src/sys/sys/signalvar.h
1.80 +1 -1 src/sys/vm/pmap.h
1.79 +5 -5 src/sys/vm/vm_extern.h
1.226 +22 -11 src/sys/vm/vm_glue.c
1.390 +23 -6 src/sys/vm/vm_map.c
More information about the cvs-src
mailing list