FreeBSD src
Go to file
Attilio Rao 248bb9379f Fix a deadlock in the shutdown code:
When performing a smp_rendezvous() or more likely, on amd64 and i386,
a smp_tlb_shootdown() the caller will end up with the smp_ipi_mtx
spinlock held, busy-waiting for other CPUs to acknowledge the operation.
As long as CPUs are suspended (via cpu_reset()) between the active mask
read and IPI sending there can be a deadlock where the caller will wait
forever for a dead CPU to acknowledge the operation.
Please note that on CPU0 that is going to be someway heavier because of
the spinlocks being disabled earlier than quitting the machine.

Fix this bug by calling cpu_reset() with the smp_ipi_mtx held.
Note that it is very likely that a saner offline/online CPUs mechanism
will help heavilly in fixing similar cases as it is likely more bugs
of this type may arise in the future.

Reported by:	rwatson
Discussed with:	jhb
Tested by:	rnoland, Giovanni Trematerra
		<giovanni dot trematerra at gmail dot com>
MFC:		2 weeks

Special deciation to:	anyone who made possible to have 16-ways machines
			in Netperf
2010-04-19 23:27:54 +00:00
bin ln: Refuse deleting a directory entry by hardlinking it to itself. 2010-04-17 22:39:53 +00:00
cddl Refine previous partial merge of OpenSolaris onnv revision 9396:f41cf682d0d3. 2010-04-05 18:27:58 +00:00
contrib MFV of tzdata2010i, r206865 2010-04-19 20:59:39 +00:00
crypto Enhance r199804 by marking the daemonised child as immune to OOM instead 2010-04-08 12:07:40 +00:00
etc Use ubthidhci_enable="NO" to avoid the bootup warning. 2010-04-17 21:31:42 +00:00
games Sync fortunes with other *BSDs 2010-03-31 18:21:25 +00:00
gnu Make this directory more regular. Since it is one we control, use the 2010-04-14 20:31:06 +00:00
include Add capability to use a db version of services. It is enabled by 2010-04-04 08:31:03 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Revert r206649. 2010-04-18 18:23:11 +00:00
libexec Forgot to initialize the debug variable. 2010-04-01 13:16:32 +00:00
release Shift the version of perl used by the release build process over to 2010-04-09 14:27:17 +00:00
rescue Remove libulog from the bootstrap again. 2010-01-21 16:56:27 +00:00
sbin fix 64-bit build 2010-04-19 16:35:47 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8n. 2010-04-01 15:37:38 +00:00
share In case a user wants to configure only an IPv6 link-local address 2010-04-17 18:48:18 +00:00
sys Fix a deadlock in the shutdown code: 2010-04-19 23:27:54 +00:00
tools Dump the AR_PHY_TURBO register on the AR5416. This register holds 11n 2010-04-19 17:16:23 +00:00
usr.bin indent(1): don't treat bare '_t' as a type name when -ta is used 2010-04-15 21:41:07 +00:00
usr.sbin Allow option aliasing. Lines of the form: 2010-04-15 15:10:46 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile For those of us mere mortals who do not aspire to the lofty heights 2010-03-18 18:58:17 +00:00
Makefile.inc1 Add note about TARGET_ARCH 2010-04-14 18:56:07 +00:00
ObsoleteFiles.inc o) Use inline functions to access coprocessor 0 registers rather than external 2010-04-17 01:17:31 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING WITH_CTF can now be specified in src.conf (not recommended, there 2010-04-02 06:55:31 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html