freebsd-skq/lib/libkse/thread
Daniel Eischen 396a73603d Set the tcb (thread control block) in the child process after a fork.
This protects against a race with an upcall in the parent during the
fork which can clobber the parent's tcb before the vm space is copied
in the child.  The child then gets a corrupted tcb that is either null
or that points to another thread that doesn't exist in the child (after
a fork, only the fork()ing thread exists in the child).

Reported by:	Arno J. Klaassen (arno at heho / snv / jussieu / fr)
2007-12-06 06:04:01 +00:00
..
Makefile.inc Include files thr_condattr_pshared.c and thr_mattr_pshare.c. 2005-10-24 05:48:32 +00:00
thr_accept.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_aio_suspend.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_atfork.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_destroy.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_get_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getdetachstate.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getguardsize.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getinheritsched.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getschedparam.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getschedpolicy.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getscope.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getstack.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getstackaddr.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_getstacksize.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_init.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setcreatesuspend_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setdetachstate.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setguardsize.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setinheritsched.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setschedparam.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setschedpolicy.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setscope.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setstack.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setstackaddr.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_attr_setstacksize.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_autoinit.c Revamp libpthread so that it has a chance of working in an SMP 2003-04-18 05:04:16 +00:00
thr_barrier.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_barrierattr.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_cancel.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_clean.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_close.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_concurrency.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_cond.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_condattr_destroy.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_condattr_init.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_condattr_pshared.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_connect.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_creat.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_create.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_detach.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_equal.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_execve.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_exit.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_fcntl.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_find_thread.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_fork.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_fsync.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_getprio.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
thr_getschedparam.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_info.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_init.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_join.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_kern.c Set the tcb (thread control block) in the child process after a fork. 2007-12-06 06:04:01 +00:00
thr_kill.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_main_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mattr_init.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mattr_kind_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mattr_pshared.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_msync.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_multi_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mutex_prioceiling.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mutex_protocol.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mutex.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_mutexattr_destroy.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_nanosleep.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_once.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_open.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_pause.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_poll.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_printf.c style cleanup: Remove duplicate $FreeBSD$ tags. 2004-02-10 20:42:33 +00:00
thr_priority_queue.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_private.h WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_pselect.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_pspinlock.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_raise.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_read.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_readv.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_resume_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_rtld.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_rwlock.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_rwlockattr.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_select.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_self.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sem.c Fix prototype mismatch and use of un-namespaced pthread functions. 2006-03-28 21:50:12 +00:00
thr_seterrno.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_setprio.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_setschedparam.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sig.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigaction.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigaltstack.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigmask.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigpending.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigprocmask.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigsuspend.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sigwait.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_single_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_sleep.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_spec.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_spinlock.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_stack.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_suspend_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_switch_np.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_symbols.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_system.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_tcdrain.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_vfork.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_wait4.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_wait.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_waitpid.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_write.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_writev.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00
thr_yield.c WARNS=3'ify. 2007-11-30 17:20:29 +00:00