Commit Graph

104317 Commits

Author SHA1 Message Date
Tim Kientzle
98183bf412 Yet another pointy hat: When restoring file flags, it's okay to use the
shared stat buffer, but don't try to access it through an uninitialized
pointer.
2004-07-04 18:28:56 +00:00
Tim Kientzle
0ddb95d12c Pass the pointy hat, please:
All of --help should go to stdout, not some to stdout and some to stderr.
2004-07-04 18:13:01 +00:00
Bruce M Simpson
df550d3259 Add documentation for the ieee80211_node.c functions.
Submitted by:	Darron Broad
2004-07-04 18:07:58 +00:00
Maxim Sobolev
ea6902220d Nothing says that /var/log can't be not a directory but a symbolic link
to a directory. Therefore, use stat(2) instead of lstat(2) to check if
/var/log exists.

MFC after:	7 days
2004-07-04 17:24:12 +00:00
Bruce M Simpson
15a66c21c0 style(9)/whitespace cleanup while I'm in this file. 2004-07-04 16:43:24 +00:00
Poul-Henning Kamp
c24097e458 Add modemcontrol support for DTR and DCD.
Tested by:	ambrisko
2004-07-04 16:27:58 +00:00
Tim J. Robbins
95cc51cfbd Fix bug causing `[' to be wrongly included in character class expressions
in some multibyte locales (Red Hat bug #108484).

Obtained from:	Fedora (Tim Waugh)
2004-07-04 16:25:41 +00:00
Warner Losh
dfbaec0a6d Make the default memory range in the top 2GB of ram in the hopes that
this more accurately reflects what the underlying hardware of most
acpi machines that don't have children pci busses.

We still need a better way to get this information from acpi/hardware.
2004-07-04 16:23:25 +00:00
Tim J. Robbins
2af417add4 Make grep run much (~10x) faster in multibyte locales by caching the wide
character representation of input data across calls to dfaexec(), and by
caching the lengths of character across calls to check_multibyte_string().

Obtained from:	Fedora (Tim Waugh)
2004-07-04 16:16:59 +00:00
Stefan Farfeleder
5908d366fb Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
Warner Losh
1877e5a42f meta_p is a void *, so a variable that's of type void * can't be
dereferenced directly.  Toss an ifdef around it for the moment and
allow this to compile.  This likely means that priority packets aren't
queued to the special high priority queue.  The maintainer of this
should look into the problem.

This is likely fallout from the netgraph migration to using a more
generic meta tag from the mbug recently.

Fixes: pc98 tinerbox
2004-07-04 16:10:36 +00:00
Bosko Milekic
0d0837ee6d Introduce debug.nosleepwithlocks sysctl, 0 by default. If set to 1
and WITNESS is not built, then force all M_WAITOK allocations to
M_NOWAIT behavior (transparently).  This is to be used temporarily
if wierd deadlocks are reported because we still have code paths
that perform M_WAITOK allocations with lock(s) held, which can
lead to deadlock.  If WITNESS is compiled, then the sysctl is ignored
and we ask witness to tell us wether we have locks held, converting
to M_NOWAIT behavior only if it tells us that we do.

Note this removes the previous mbuf.h inclusion as well (only needed
by last revision), and cleans up unneeded [artificial] comparisons
to just the mbuf zones.  The problem described above has nothing to
do with previous mbuf wait behavior; it is a general problem.
2004-07-04 16:07:44 +00:00
Brian Feldman
7a708c3626 Reextend the M_WAITOK-disabling-hack to all three of the mbuf-related
zones, and do it by direct comparison of uma_zone_t instead of strcmp.

The mbuf subsystem used to provide M_TRYWAIT/M_DONTWAIT semantics, but
this is mostly no longer the case.  M_WAITOK has taken over the spot
M_TRYWAIT used to have, and for mbuf things, still may return NULL if
the code path is incorrectly holding a mutex going into mbuf allocation
functions.

The M_WAITOK/M_NOWAIT semantics are absolute; though it may deadlock
the system to try to malloc or uma_zalloc something with a mutex held
and M_WAITOK specified, it is absolutely required to not return NULL
and will result in instability and/or security breaches otherwise.
There is still room to add the WITNESS_WARN() to all cases so that
we are notified of the possibility of deadlocks, but it cannot change
the value of the "badness" variable and allow allocation to actually
fail except for the specialized cases which used to be M_TRYWAIT.
2004-07-04 15:59:25 +00:00
Bruce M Simpson
4c9e94d42c The net.link.ether.bridge.enable sysctl MIB variable enables bridge
functionality by setting to a non-zero value. This is an integer, but
is treated as a boolean by the code, so clamp it to a boolean value
when set so as to avoid unnecessary bridge reinitialization if it's
changed to another value.

PR:		kern/61174
Requested by:	Bruce Cran
2004-07-04 15:53:28 +00:00
Simon L. B. Nielsen
69f9d7b13f Add a HARDWARE section which lists supported devices. The actual
device listings has been moved (and in some cases more or less
rewritten) from the DESCRIPTION section.

This will be used later for automatically generating device listings
in the Hardware Notes, by parsing the manual pages.

Reviewed in principle by:	ru, hrs, trhodes
No objections:			-doc, re
Section name inspired by:	NetBSD
2004-07-04 14:17:41 +00:00
Tim J. Robbins
7358ecc6b6 Avoid accessing accessing memory past the end of mb_properties in the
degenerate case of fgrep with an empty pattern in a multibyte locale.
Found by phkmalloc.
2004-07-04 14:00:25 +00:00
Poul-Henning Kamp
8529ce7a87 We only need to check for overlaps if we increasing access counts. 2004-07-04 13:44:48 +00:00
Poul-Henning Kamp
22c624779b Give natd multi-instance capabilities.
This makes it possible to do load-sharing on two xDSL lines etc.
2004-07-04 12:53:54 +00:00
Poul-Henning Kamp
e6bbb69149 Add LibAliasOutTry() which checks a packet for a hit in the tables, but
does not create a new entry if none is found.
2004-07-04 12:53:07 +00:00
Poul-Henning Kamp
1cbb1e02c4 Blocksize for I/O should be a property of the vnode and not found by groping
around in the vnodes surroundings when we allocate a block.

Assign a blocksize when we create a vnode, and yell a warning (and ignore it)
if we got the wrong size.

Please email all such warnings to me.
2004-07-04 12:49:04 +00:00
Tim J. Robbins
91a4826a49 Improve case-insensitive matching in multibyte locales.
Obtained from:	Isamu Hasegawa (IBM) via Fedora
2004-07-04 11:58:10 +00:00
Tim J. Robbins
a7e3f3f0db Fix failure of fgrep to report some matches (Red Hat bug #116909).
Obtained from:	Fedora (Tim Waugh)
2004-07-04 11:33:49 +00:00
Alfred Perlstein
94ed9c8af5 Introduce a new kevent filter. EVFILT_FS that will be used to signal
generic filesystem events to userspace.  Currently only mount and unmount
of filesystems are signalled.  Soon to be added, up/down status of NFS.

Introduce a sysctl node used to route requests to/from filesystems
based on filesystem ids.

Introduce a new vfsop, vfs_sysctl(mp, req) that is used as the callback/
entrypoint by the sysctl code to change individual filesystems.
2004-07-04 10:52:54 +00:00
Tim J. Robbins
dddd0d87a3 Use hard_locale() to check whether collating order is "hard" regardless
of whether NLS is enabled.
2004-07-04 10:24:48 +00:00
Tim J. Robbins
1188285e9b Ignore ENABLE_NLS when deciding whether we can use setlocale().
Use the same shortcut as glibc to test for the "C" or "POSIX" locale.
2004-07-04 10:22:50 +00:00
Alfred Perlstein
903ac7c219 Revision 1.496 would not boot on my system due to
ffs_mount -> bdevvp -> getnewvnode(..., mp = NULL, ...) ->
 insmntqueue(vp, mp = NULL) -> KASSERT -> panic

Make getnewvnode() only call insmntqueue() if the mountpoint parameter
is not NULL.
2004-07-04 10:19:15 +00:00
Tim J. Robbins
19b0d58f6f Update for grep 2.5.1. 2004-07-04 10:05:37 +00:00
Tim J. Robbins
e5978bf334 Merge local changes. 2004-07-04 10:02:03 +00:00
Tim J. Robbins
d1e9179e8c This commit was generated by cvs2svn to compensate for changes in r131554,
which included commits to RCS files with non-trunk default branches.
2004-07-04 09:52:08 +00:00
Tim J. Robbins
6fdbbb5487 Import GNU grep 2.5.1 (trimmed) 2004-07-04 09:52:08 +00:00
MIHIRA Sanpei Yoshiro
b866026be5 Add device ID for atuwi USB wlan driver, Linksys WUSB11 v2.8 wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/68465
Submitted by:	Suihong Liang <s2liang@uwaterloo.ca>
2004-07-04 09:13:53 +00:00
Poul-Henning Kamp
e3c5a7a4dd When we traverse the vnodes on a mountpoint we need to look out for
our cached 'next vnode' being removed from this mountpoint.  If we
find that it was recycled, we restart our traversal from the start
of the list.

Code to do that is in all local disk filesystems (and a few other
places) and looks roughly like this:

		MNT_ILOCK(mp);
	loop:
		for (vp = TAILQ_FIRST(&mp...);
		    (vp = nvp) != NULL;
		    nvp = TAILQ_NEXT(vp,...)) {
			if (vp->v_mount != mp)
				goto loop;
			MNT_IUNLOCK(mp);
			...
			MNT_ILOCK(mp);
		}
		MNT_IUNLOCK(mp);

The code which takes vnodes off a mountpoint looks like this:

	MNT_ILOCK(vp->v_mount);
	...
	TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes);
	...
	MNT_IUNLOCK(vp->v_mount);
	...
	vp->v_mount = something;

(Take a moment and try to spot the locking error before you read on.)

On a SMP system, one CPU could have removed nvp from our mountlist
but not yet gotten to assign a new value to vp->v_mount while another
CPU simultaneously get to the top of the traversal loop where it
finds that (vp->v_mount != mp) is not true despite the fact that
the vnode has indeed been removed from our mountpoint.

Fix:

Introduce the macro MNT_VNODE_FOREACH() to traverse the list of
vnodes on a mountpoint while taking into account that vnodes may
be removed from the list as we go.  This saves approx 65 lines of
duplicated code.

Split the insmntque() which potentially moves a vnode from one mount
point to another into delmntque() and insmntque() which does just
what the names say.

Fix delmntque() to set vp->v_mount to NULL while holding the
mountpoint lock.
2004-07-04 08:52:35 +00:00
Colin Percival
f5e16e6131 Wrap rc.subr inside
if [ -z "${_rc_subr_loaded}" ]; then
_rc_subr_loaded="YES"
...
fi

in order to avoid re-interpreting rc.subr every time an rc.d
script is run.  In my tests, this speeds up rc time by about
8-10%.
2004-07-04 07:21:18 +00:00
Scott Long
ab0b83b529 Document that boundaries cannot be smaller than the max segment size. 2004-07-04 04:50:00 +00:00
Juli Mallett
32889325b8 Yes, NgRecvAsciiMsg has the same results as NgRecvAsciiMsg, but it's
much more apt to note that it has the same result as NgRecvMsg.  Make
the manual page less circular in its reference to this fact.
2004-07-04 04:03:37 +00:00
Tim J. Robbins
1700949687 Fix regression in new version of GNU regex code: bracket expressions
like [X-Y] should match all characters between X-Y according to the
locale's collating order, not by binary value. For now, this only fixes
the !MBS_SUPPORT case (which is the default).
2004-07-04 02:46:55 +00:00
Tim J. Robbins
20822a0b71 Merge local changes (addition of $FreeBSD$). 2004-07-04 01:07:38 +00:00
Tim J. Robbins
c690985767 This commit was generated by cvs2svn to compensate for changes in r131543,
which included commits to RCS files with non-trunk default branches.
2004-07-04 01:03:02 +00:00
Tim J. Robbins
1a9b678f8d Import of GNU regex from GNU grep 2.5.1 (trimmed). 2004-07-04 01:03:02 +00:00
Ruslan Ermilov
a817e9e674 Fixed markup. 2004-07-03 23:14:34 +00:00
Ruslan Ermilov
adf942c690 One more hard sentence break. 2004-07-03 23:01:44 +00:00
Ruslan Ermilov
651aa6348e Merge junk. 2004-07-03 22:53:50 +00:00
Ruslan Ermilov
30950a21e1 Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
Warner Losh
3d595e7e8a Document /var/run/dmesg.boot, which is created by the rc scripts. Many
people have suggested that we document this somewhere, and this was a common
suggestion.
2004-07-03 21:01:18 +00:00
Warner Losh
48375ebec9 These don't need RMAN_RESOURCE_VISIBLE now that rman is visible 2004-07-03 20:56:16 +00:00
Warner Losh
c82338ca27 Really remove __RMAN_RESORUCE_VISIBLE 2004-07-03 20:49:00 +00:00
Warner Losh
8acf75a06d Use the rman_* functions in preference to reaching into struct resource.
Remove __RMAN_RESOURCE_VISIBLE after compilation confirms it is now not
needed.
2004-07-03 20:48:01 +00:00
Warner Losh
8b68b82381 Don't define __RMAN_RESOURCE_VISISBLE. They aren't needed here after
I've converted the direct accessing of struct resource members to the
preferred interface.
2004-07-03 20:11:49 +00:00
Poul-Henning Kamp
cfa5e80af8 Remove stale comment 2004-07-03 19:37:06 +00:00
Robert Watson
3a54d6a8a8 Change M_WAITOK argument to sodupsockaddr() to M_NOWAIT. When the call
to dup_sockaddr() was renamed to sodupsockaddr(), the argument was
changed from '1' to 'M_WAITOK', which changed the semantics.  This
resulted in a WITNESS warning about a potential sleep while holding the
NFS server mutex.  Now this will no longer happen, restoring a possible
bug present in the original code (setting RC_NAM even though the malloc
to copy the addres may fail).  bde observes that the flag names here
should probably not be the same as the malloc flags for name space
reasons.

Bumped into by:	kuriyama
2004-07-03 19:17:06 +00:00