freebsd kernel with SKQ
Go to file
Don Lewis 12e524a290 Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
	Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by:	Stefan Ehmann <shoesoft AT gmx.net>
Tested by:	matk (Mathew Kanner)
Tested by:	Gordon Bergling <gbergling AT 0xfce3.net>
2004-01-28 08:02:15 +00:00
bin Fix alignment of size field in ls -lh -- the width was being computed 2004-01-22 04:33:00 +00:00
contrib Merge from NetBSD rev. 1.2 (drochner): Do the address calculations inside 2004-01-28 05:55:13 +00:00
crypto Update the "overview of FreeBSD changes to OpenSSH-portable" to reflect 2004-01-25 13:09:56 +00:00
etc Remove only X[0-9]-lock. 2004-01-27 18:19:32 +00:00
games "The Aged Aged Man" was not a word doubling. 2004-01-19 21:22:21 +00:00
gnu Discontinuation of an action that now fits on one. 2004-01-27 05:01:08 +00:00
include Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
kerberos5 Fixed "make clean". 2004-01-15 10:02:34 +00:00
lib Fix an uninitialized variable bug that caused write_pmbr() to bogusly 2004-01-28 03:38:25 +00:00
libexec add missing setusershell() calls. 2004-01-18 21:29:33 +00:00
release Modified release note: Rewrite CVS update note to reflect reality 2004-01-27 00:50:21 +00:00
rescue Revision 1.7 of this file added information 2004-01-18 22:24:23 +00:00
sbin Style nit in previous commit. 2004-01-27 19:28:13 +00:00
secure Added two utility targets "secure" and "insecure", analogous to 2004-01-18 07:44:53 +00:00
share Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
sys Change KASSERT() in feed_vchan16() into an explicit test and call to 2004-01-28 08:02:15 +00:00
tools Fix the case where .OBJDIR != .CURDIR. 2004-01-25 19:11:43 +00:00
usr.bin Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
usr.sbin Add NO_BLUETOOTH knob to the build process 2004-01-28 00:42:51 +00:00
COPYRIGHT Update the COPYRIGHT file to include FreeBSD's compilation copyright 2003-12-31 22:35:22 +00:00
MAINTAINERS Add an entry for RELENG_5_* to match the RELENG_4_* entry. 2004-01-27 14:33:33 +00:00
Makefile Put on some factor 30+ bikeshed repellent and export the internal 2003-12-09 02:08:19 +00:00
Makefile.inc1 Create the OID and tree files while building the modules and the daemon 2004-01-23 16:22:49 +00:00
README KerberosIV de-orbit burn continues. Disconnect from "make world". 2003-03-08 10:01:26 +00:00
UPDATING Add a note to say that ULE is now the default scheduler in GENERIC. 2004-01-26 09:57:04 +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
``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.

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