dragonfly.git
18 years agoProperly integrate the now mandatory serializer into the WI network driver.
Matthew Dillon [Fri, 16 Dec 2005 21:05:48 +0000 (21:05 +0000)]
Properly integrate the now mandatory serializer into the WI network driver.

Reported-by: Steve Mynott <steve.mynott@gmail.com>
Patch-supplied-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoDo not try to write sparse files when using zlib.
Simon Schubert [Thu, 15 Dec 2005 22:20:49 +0000 (22:20 +0000)]
Do not try to write sparse files when using zlib.

Noticed-by: Joe Talbott <josepht@cstone.net>
Obtained-from: FreeBSD

18 years agoUpdate for axe(4), nv(4), re(4) and rue(4). Add missing xref to bfe(4).
Sascha Wildner [Thu, 15 Dec 2005 09:04:59 +0000 (09:04 +0000)]
Update for axe(4), nv(4), re(4) and rue(4). Add missing xref to bfe(4).

18 years agopfnStop() seems to take a flags argument which as far as I can tell from
Matthew Dillon [Wed, 14 Dec 2005 17:04:29 +0000 (17:04 +0000)]
pfnStop() seems to take a flags argument which as far as I can tell from
the header file needs specific flags rather then 0.

Move the calls to nv_setmulti() and nv_ifmedia_upd() to just before
the pfnStart() call.   Note that FreeBSD moved the calls even further
back, to before the pfnInit(), but that is probably not correct.

18 years agoGC old cvs source
Simon Schubert [Wed, 14 Dec 2005 07:35:32 +0000 (07:35 +0000)]
GC old cvs source

18 years agoFix reference.
Sascha Wildner [Tue, 13 Dec 2005 08:38:55 +0000 (08:38 +0000)]
Fix reference.

18 years agoAdd pf example configs
Simon Schubert [Tue, 13 Dec 2005 01:58:27 +0000 (01:58 +0000)]
Add pf example configs

Obtained-from: OpenBSD
Noticed-we-are-missing-them: swildner

18 years agoMove tsc_offsets[] to a new home to unbreak kernel builds, again.
Matthew Dillon [Mon, 12 Dec 2005 08:15:03 +0000 (08:15 +0000)]
Move tsc_offsets[] to a new home to unbreak kernel builds, again.

Add additional performance tests to kern/kern_ktr.c

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx> (tsc_offsets issue)
18 years agoRemove the 'all' target to fix buildworld, and fix a
Matthew Dillon [Sun, 11 Dec 2005 18:36:14 +0000 (18:36 +0000)]
Remove the 'all' target to fix buildworld, and fix a
type-o (.PHONE -> .PHONY).

18 years agoFix typo.
Sascha Wildner [Sun, 11 Dec 2005 13:28:53 +0000 (13:28 +0000)]
Fix typo.

18 years ago* Ansify function definitions.
Sascha Wildner [Sun, 11 Dec 2005 13:00:17 +0000 (13:00 +0000)]
* Ansify function definitions.

* Minor style cleanup.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years ago* Ansify function definitions.
Sascha Wildner [Sun, 11 Dec 2005 02:27:26 +0000 (02:27 +0000)]
* Ansify function definitions.

* Remove parameter names from prototypes.

* Minor style cleanup.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years ago* Ansify function definitions.
Sascha Wildner [Sun, 11 Dec 2005 01:54:09 +0000 (01:54 +0000)]
* Ansify function definitions.

* Minor style cleanup.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years agoAdd a feature and a sysctl (debug.ktr.testipicnt) to test inter-cpu
Matthew Dillon [Sat, 10 Dec 2005 21:19:30 +0000 (21:19 +0000)]
Add a feature and a sysctl (debug.ktr.testipicnt) to test inter-cpu
IPI messaging performance, and document it.

18 years agoFix another interesting bug. td_threadq is shared by the LWKT scheduler,
Matthew Dillon [Sat, 10 Dec 2005 18:50:36 +0000 (18:50 +0000)]
Fix another interesting bug.  td_threadq is shared by the LWKT scheduler,
tsleep, and port-blocking code.  Because of this separate flags exist to
indicate which queue the thread currently resides on and careful sanity
checks were added to prevent corruption.

The thread scheduler will not enqueue a thread that is sitting on one of
these other queues.  This commit fixes a bug where the preemption code
would still preemptively switch into the thread even when the enqueue fails,
causing an assertion to be hit in tsleep().

This just goes to show that asserting on supposedly impossible conditions is
a good idea :-).

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoDon't display the file and line by default.
Matthew Dillon [Sat, 10 Dec 2005 18:38:26 +0000 (18:38 +0000)]
Don't display the file and line by default.

18 years agoAdd KTR logging for IF_EM to measure interrupt overhead and packet
Matthew Dillon [Sat, 10 Dec 2005 18:28:18 +0000 (18:28 +0000)]
Add KTR logging for IF_EM to measure interrupt overhead and packet
receive / transmit / transmit-cleanup operations.

18 years agoAdd KTR logging for tsleep entry/exit and wakeup entry/exit.
Matthew Dillon [Sat, 10 Dec 2005 18:27:24 +0000 (18:27 +0000)]
Add KTR logging for tsleep entry/exit and wakeup entry/exit.

18 years agoMake the KTR test logging work for UP as well as SMP.
Matthew Dillon [Sat, 10 Dec 2005 18:25:18 +0000 (18:25 +0000)]
Make the KTR test logging work for UP as well as SMP.

18 years agoFix UP build issues. Move tsc_offsets[] from mp_machdep.c to kern_ktr.c,
Matthew Dillon [Sat, 10 Dec 2005 18:16:37 +0000 (18:16 +0000)]
Fix UP build issues.  Move tsc_offsets[] from mp_machdep.c to kern_ktr.c,
and document the routines.

Reported-by: Sascha Wildner <saw@online.de>
18 years agoDo not ldconfig -m /usr/lib/gcc2 if there is no /usr/lib/gcc2 directory.
Matthew Dillon [Sat, 10 Dec 2005 17:41:25 +0000 (17:41 +0000)]
Do not ldconfig -m /usr/lib/gcc2 if there is no /usr/lib/gcc2 directory.

Submitted-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoBeef up error reporting for a particular assertion to try to track down a
Matthew Dillon [Sat, 10 Dec 2005 17:36:39 +0000 (17:36 +0000)]
Beef up error reporting for a particular assertion to try to track down a
panic reported by Stefan Krueger.

18 years agoAnsify function definitions.
Sascha Wildner [Sat, 10 Dec 2005 16:06:21 +0000 (16:06 +0000)]
Ansify function definitions.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years agoRework nrelease framework for pkgsrc. The way the bootstrap kit was
Joerg Sonnenberger [Sat, 10 Dec 2005 14:47:05 +0000 (14:47 +0000)]
Rework nrelease framework for pkgsrc.  The way the bootstrap kit was
build was incorrect, since the wrong path names end up in the
binaries.  Instead of building it redundantly every time, just expect
a binary bootstrap kit.  Change the installer targets to be a conditional
instead (WITH_INSTALLER), but keep the old targets for compatibility.

The CGI frontend is temporarily removed until the configuration is
updated.  cvsup doesn't currently build, a workaround pkg will be added
latter.

Add a description of how this framework is intended to be used.

18 years agoAnsify function definitions.
Sascha Wildner [Sat, 10 Dec 2005 00:39:48 +0000 (00:39 +0000)]
Ansify function definitions.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years agoFix some manlint nits and add .Dx where appropriate.
Sascha Wildner [Sat, 10 Dec 2005 00:22:29 +0000 (00:22 +0000)]
Fix some manlint nits and add .Dx where appropriate.

18 years agoAdd some bits from FreeBSD to reflect reality.
Sascha Wildner [Sat, 10 Dec 2005 00:19:18 +0000 (00:19 +0000)]
Add some bits from FreeBSD to reflect reality.

18 years agoRemove obsolete 1aout manual section.
Sascha Wildner [Sat, 10 Dec 2005 00:15:01 +0000 (00:15 +0000)]
Remove obsolete 1aout manual section.

18 years agoRemove last traces of 'DragonFly' keywords in RCNG scripts.
Sascha Wildner [Sat, 10 Dec 2005 00:11:08 +0000 (00:11 +0000)]
Remove last traces of 'DragonFly' keywords in RCNG scripts.

18 years agoAdd some better mdoc markup.
Sascha Wildner [Sat, 10 Dec 2005 00:04:51 +0000 (00:04 +0000)]
Add some better mdoc markup.

18 years agoRemove library definitions which are in doc-syms now.
Sascha Wildner [Sat, 10 Dec 2005 00:03:08 +0000 (00:03 +0000)]
Remove library definitions which are in doc-syms now.

18 years agoRemove BOOTWAIT and NO_SHAREDOCS options. BOOTWAIT was from the old
Sascha Wildner [Fri, 9 Dec 2005 23:55:28 +0000 (23:55 +0000)]
Remove BOOTWAIT and NO_SHAREDOCS options. BOOTWAIT was from the old
boot code and NO_SHAREDOCS is obsolete since we don't build share/doc
anymore.

18 years agoAdd 'manlint' (from bsd.man.mk) to the top level targets.
Sascha Wildner [Fri, 9 Dec 2005 18:53:44 +0000 (18:53 +0000)]
Add 'manlint' (from bsd.man.mk) to the top level targets.

18 years agoFix the directory scan code for SMBFS. It was losing track of the directory
Matthew Dillon [Thu, 8 Dec 2005 20:37:20 +0000 (20:37 +0000)]
Fix the directory scan code for SMBFS.  It was losing track of the directory
offset during the scan.

18 years agoSB_NOINTR must be set for the socket to prevent nbssn_recv() from hard
Matthew Dillon [Thu, 8 Dec 2005 20:20:34 +0000 (20:20 +0000)]
SB_NOINTR must be set for the socket to prevent nbssn_recv() from hard
looping on EWOULDBLOCK.

18 years agoClean up more spinlock conversion issues and fix related panics.
Matthew Dillon [Thu, 8 Dec 2005 19:15:12 +0000 (19:15 +0000)]
Clean up more spinlock conversion issues and fix related panics.

Reported-by: "Adrian M. Nida" <nida@musc.edu>
18 years agoFix a bug which was introduced in cvs-1.12.13.
Simon Schubert [Wed, 7 Dec 2005 13:42:57 +0000 (13:42 +0000)]
Fix a bug which was introduced in cvs-1.12.13.

With running compression and ssh/rsh it could happen that the zlib
layer would want to read $expected_bytes, which would block because
$expected_bytes of course is a inflated quantity and can't be compared
to the deflated size, except for
$expected_bytes > 0 -> $expected_deflated_bytes > 0

Restore old behaviour which only read one byte a time.

18 years agoAdd additional KTR lines to allow us to characterize the total overhead
Matthew Dillon [Wed, 7 Dec 2005 04:49:54 +0000 (04:49 +0000)]
Add additional KTR lines to allow us to characterize the total overhead
when calling malloc() and free().

18 years agoAdd KTR_TESTLOG and debug.ktr.testlogcnt, which issues three ktrlog() calls
Matthew Dillon [Wed, 7 Dec 2005 04:27:50 +0000 (04:27 +0000)]
Add KTR_TESTLOG and debug.ktr.testlogcnt, which issues three ktrlog() calls
in a row and allows one to measure the overhead of the KTR logging facility.

18 years agoAdd the globbing flag GLOB_PERIOD.
Simon Schubert [Wed, 7 Dec 2005 02:28:15 +0000 (02:28 +0000)]
Add the globbing flag GLOB_PERIOD.
This allows matching of filenames that starts with a dot.

18 years agoSwitch to cvs-1.12.13
Simon Schubert [Wed, 7 Dec 2005 01:16:30 +0000 (01:16 +0000)]
Switch to cvs-1.12.13

18 years agoAdd our READMEs to the new cvs import
Simon Schubert [Wed, 7 Dec 2005 00:39:02 +0000 (00:39 +0000)]
Add our READMEs to the new cvs import

18 years agoMerge from vendor branch CVS:
Simon Schubert [Wed, 7 Dec 2005 00:15:30 +0000 (00:15 +0000)]
Merge from vendor branch CVS:
Import a stripped down cvs-1.12.13

18 years agoImport a stripped down cvs-1.12.13
Simon Schubert [Wed, 7 Dec 2005 00:15:30 +0000 (00:15 +0000)]
Import a stripped down cvs-1.12.13

18 years agoEnhance ktrdump to generate relative timestamps in fractional microseconds,
Matthew Dillon [Tue, 6 Dec 2005 23:41:56 +0000 (23:41 +0000)]
Enhance ktrdump to generate relative timestamps in fractional microseconds,
add an option to merge all cpus into one log (-s), and locate the starting
point in the FIFO when dumping output.

18 years agoSynchronize the TSC between all cpus on startup and provide a sysctl,
Matthew Dillon [Tue, 6 Dec 2005 23:37:55 +0000 (23:37 +0000)]
Synchronize the TSC between all cpus on startup and provide a sysctl,
debug.ktr.resynchronize, which will (very expensively) resynchronize the
TSCs 10 times a second to reduce drift errors to manageable numbers.

The TSC on all the cpus for the purposes of ktrdump's ought to be
synchronizated within ~200ns of each other, assuming all cpus are running
at the same frequency.

This needs more work.  What we really need to do is calculate the drift
for each cpu and apply it dynamically.

18 years agoRevert last change and add toascii.c to the right variable.
Joerg Sonnenberger [Tue, 6 Dec 2005 17:49:22 +0000 (17:49 +0000)]
Revert last change and add toascii.c to the right variable.

18 years agotoascii(3) got lost during ctype conversion.
Joerg Sonnenberger [Tue, 6 Dec 2005 17:36:20 +0000 (17:36 +0000)]
toascii(3) got lost during ctype conversion.

18 years agominor style change
Sepherosa Ziehau [Tue, 6 Dec 2005 13:51:01 +0000 (13:51 +0000)]
minor style change

18 years agoremove duplicated `use'
Sepherosa Ziehau [Tue, 6 Dec 2005 13:48:49 +0000 (13:48 +0000)]
remove duplicated `use'

18 years agoThe new lockmgr() function requires spinlocks, not tokens. Take this
Matthew Dillon [Tue, 6 Dec 2005 04:03:56 +0000 (04:03 +0000)]
The new lockmgr() function requires spinlocks, not tokens.   Take this
opportunity to convert all use of tokens in SMB to spinlocks since they
are only used to wrap very low level operations.

Reported-by: "Adrian M. Nida" <nida@musc.edu>
18 years agoUse sh to run scripts instead of relying on their +x bit
Simon Schubert [Tue, 6 Dec 2005 02:22:23 +0000 (02:22 +0000)]
Use sh to run scripts instead of relying on their +x bit

18 years agodoreti and splz were improperly requiring that the MP lock be held in order
Matthew Dillon [Tue, 6 Dec 2005 02:02:24 +0000 (02:02 +0000)]
doreti and splz were improperly requiring that the MP lock be held in order
to process delayed FAST interrupts.  This could result in clock interrupts
getting delayed indefinitely when the MP lock was held by another cpu.
The delayed clock interrupts further resulted in clock-related issues such
as the system time running slow, and other problems.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoDocument the nfs dirent conversion code. No functional changes.
Matthew Dillon [Mon, 5 Dec 2005 17:01:53 +0000 (17:01 +0000)]
Document the nfs dirent conversion code.  No functional changes.

18 years agoAdd an option -b which dumps the clean/dirty buffer cache RB trees for
Matthew Dillon [Mon, 5 Dec 2005 16:52:02 +0000 (16:52 +0000)]
Add an option -b which dumps the clean/dirty buffer cache RB trees for
each vnode.

18 years agoSync up misc work on the currently inactive syscall mapping library.
Matthew Dillon [Mon, 5 Dec 2005 16:48:22 +0000 (16:48 +0000)]
Sync up misc work on the currently inactive syscall mapping library.

18 years agoFix a bug in our RB_SCAN calls. A critical section is required to
Matthew Dillon [Mon, 5 Dec 2005 06:13:16 +0000 (06:13 +0000)]
Fix a bug in our RB_SCAN calls.  A critical section is required to
protect the RB tree against I/O completions.  Also do not abort a scan
if an I/O completion moves a buffer off the dirty list and onto the clean
list while we are trying to lock it.

There is a small chance that this bug could have resulted in dirty buffers
being left intact after being freed from the filesystem bitmap, which in
turn can cause filesystem corruption (dirbad and other panics).

Note that this was a DragonFly-only bug.

18 years agoAnsify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 03:42:31 +0000 (03:42 +0000)]
Ansify function definitions.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
18 years ago- Ansify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 02:40:28 +0000 (02:40 +0000)]
- Ansify function definitions.

- Move function type on a line of its own.

- Minor style cleanup.

18 years agoSilence troff warning.
Sascha Wildner [Mon, 5 Dec 2005 02:22:51 +0000 (02:22 +0000)]
Silence troff warning.

18 years agoAdd DragonFly 1.2, 1.3.6 and 1.3.7. Remove 1.2.* (those have bug fixes only).
Sascha Wildner [Mon, 5 Dec 2005 02:22:08 +0000 (02:22 +0000)]
Add DragonFly 1.2, 1.3.6 and 1.3.7. Remove 1.2.* (those have bug fixes only).

18 years ago- Ansify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 01:23:23 +0000 (01:23 +0000)]
- Ansify function definitions.

- Move function type on a line of its own.

- Remove __P().

- Minor style cleanup.

18 years agoUse DOSMAGIC from <sys/diskmbr.h>.
Sascha Wildner [Mon, 5 Dec 2005 01:16:47 +0000 (01:16 +0000)]
Use DOSMAGIC from <sys/diskmbr.h>.

18 years ago- Ansify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 01:04:01 +0000 (01:04 +0000)]
- Ansify function definitions.

- Move function type on a line of its own.

- Remove __P().

- Minor style cleanup.

- Remove (void) casts for unused return values.

18 years agoAnsify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 00:58:50 +0000 (00:58 +0000)]
Ansify function definitions.

18 years ago- Ansify function definitions.
Sascha Wildner [Mon, 5 Dec 2005 00:47:57 +0000 (00:47 +0000)]
- Ansify function definitions.

- Remove (void) casts for unused return values.

- Add prototypes.

- Fix some warnings.

- Fix some minor style(9) issues.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

18 years agoInclude <time.h> to silence some warnings.
Sascha Wildner [Sun, 4 Dec 2005 23:41:06 +0000 (23:41 +0000)]
Include <time.h> to silence some warnings.

18 years ago- Ansify function definitions.
Sascha Wildner [Sun, 4 Dec 2005 23:25:40 +0000 (23:25 +0000)]
- Ansify function definitions.

- Remove (void) casts for unused return values.

- Remove P().

- Fix some warnings.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>

18 years agoUpdate more default cshrc/profiles with new paths.
Matthew Dillon [Sun, 4 Dec 2005 22:29:30 +0000 (22:29 +0000)]
Update more default cshrc/profiles with new paths.

18 years agoRequire pkgsrc to be installed, include pkgsrc bootstrap binaries and mk.conf
Matthew Dillon [Sun, 4 Dec 2005 21:24:13 +0000 (21:24 +0000)]
Require pkgsrc to be installed, include pkgsrc bootstrap binaries and mk.conf
on the ISO, and provide make targets to install pkgsrc, mk.conf, and the
bootstrap binaries on the local machine.

18 years agoAdd /usr/pkg/[s]bin to /bin/sh's default path and login.conf's default path.
Matthew Dillon [Sun, 4 Dec 2005 20:32:51 +0000 (20:32 +0000)]
Add /usr/pkg/[s]bin to /bin/sh's default path and login.conf's default path.

18 years agoAdd support for DLink 528(T) Gigabit cards.
Matthew Dillon [Sun, 4 Dec 2005 18:07:49 +0000 (18:07 +0000)]
Add support for DLink 528(T) Gigabit cards.

Submitted-by: Gary Allan <dragonfly@gallan.plus.com>
Taken-from: FreeBSD

18 years agoFix a bogus proc0 test that is no longer accurate. This should allow the
Matthew Dillon [Sat, 3 Dec 2005 21:01:03 +0000 (21:01 +0000)]
Fix a bogus proc0 test that is no longer accurate.  This should allow the
smb module to be loaded.

Reported-by: Adrian Nida <nida@musc.edu>
18 years agoReduce SCSI_DELAY in GENERIC from 15 seconds to 5 seconds.
Matthew Dillon [Sat, 3 Dec 2005 18:32:32 +0000 (18:32 +0000)]
Reduce SCSI_DELAY in GENERIC from 15 seconds to 5 seconds.

Requested-by: many
18 years agoUpdate to openssl-0.9.8a and regen man pages
Simon Schubert [Sat, 3 Dec 2005 14:06:17 +0000 (14:06 +0000)]
Update to openssl-0.9.8a and regen man pages

18 years agoUpdate our READMEs for OpenSSL
Simon Schubert [Sat, 3 Dec 2005 14:00:43 +0000 (14:00 +0000)]
Update our READMEs for OpenSSL

18 years agoMerge from vendor branch OPENSSL:
Simon Schubert [Sat, 3 Dec 2005 13:48:16 +0000 (13:48 +0000)]
Merge from vendor branch OPENSSL:
Import OpenSSL 0.9.8a

18 years agoImport OpenSSL 0.9.8a
Simon Schubert [Sat, 3 Dec 2005 13:48:16 +0000 (13:48 +0000)]
Import OpenSSL 0.9.8a

18 years agoRemove some files we don't need from CVS's sources
Simon Schubert [Sat, 3 Dec 2005 12:11:44 +0000 (12:11 +0000)]
Remove some files we don't need from CVS's sources

18 years agoMerge from vendor branch CVS:
Simon Schubert [Sat, 3 Dec 2005 12:11:44 +0000 (12:11 +0000)]
Merge from vendor branch CVS:
Remove some files we don't need from CVS's sources

18 years agoRemove some files we don't need from CVS's sources
Simon Schubert [Sat, 3 Dec 2005 12:11:44 +0000 (12:11 +0000)]
Remove some files we don't need from CVS's sources

18 years agoSet POSIX feature test macros to the correct value as mendated by SUS.
Joerg Sonnenberger [Sat, 3 Dec 2005 02:19:52 +0000 (02:19 +0000)]
Set POSIX feature test macros to the correct value as mendated by SUS.

18 years agoFix a process exit/wait race. The wait*() code was making a faulty test
Matthew Dillon [Fri, 2 Dec 2005 22:02:20 +0000 (22:02 +0000)]
Fix a process exit/wait race.  The wait*() code was making a faulty test
to determine that the exiting process had completely exited and was no
longer running.  Testing the TDF_RUNNING flag is insufficient because an
exiting process may block at various points after becoming a Zombie, but
before it deschedules itself for the last time.

Add a new flag, TDF_EXITING, which is set just prior to a thread descheduling
itself for the last time.  The reaper then checks that TDF_EXITING is set
and TDF_RUNNING is clear.

Fix a second faulty test in both the exit and the thread cpu migration
code.  If a thread gets preempted, TDF_RUNNING will be temporarily cleared,
so testing TDF_RUNNING is not sufficient by itself.  We must also test
the TDF_PREEMPT_LOCK flag to be sure that it is also clear.

So the grand result is that to really be sure the zombie process has been
completely descheduled and is no longer running or will ever run again,
the TDF_EXITING, TDF_RUNNING, *and* TDF_PREEMPT_LOCK flags must be tested
and all must be clear except for TDF_EXITING.

It should be noted that TDF_RUNNING on the previously scheduled process
is always cleared AFTER we have context-switched into the next scheduled
thread or the idle thread, so seeing a cleared TDF_RUNNING along with the
appropriate state for the other flags does in fact guarentee that the thread
in question is no longer using its stack in any way.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoFix a bug in the big tsleep/wakeup cleanup commit. When stopping a
Matthew Dillon [Fri, 2 Dec 2005 19:31:49 +0000 (19:31 +0000)]
Fix a bug in the big tsleep/wakeup cleanup commit.  When stopping a
sleeping process in psignal, we must wakeup() the parent process that
might be waiting in a wait4().

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
18 years agocred may be NULL due to a prior error code. crhold() handles NULL creds,
Matthew Dillon [Fri, 2 Dec 2005 17:29:45 +0000 (17:29 +0000)]
cred may be NULL due to a prior error code.  crhold() handles NULL creds,
but crfree() does not.  Check for NULL.

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoChange the initial path from /bin:/usr/bin to /bin:/usr/bin:/sbin:/usr/sbin
Matthew Dillon [Fri, 2 Dec 2005 17:16:10 +0000 (17:16 +0000)]
Change the initial path from /bin:/usr/bin to /bin:/usr/bin:/sbin:/usr/sbin
when no PATH environment variable is present.  This only really effects
boot -s, and not having [/usr]/sbin has always been an annoyance.

Requested-by: many
18 years agoDo not hold the ifnet serializer when entering tsleep() in the PPP TUN
Matthew Dillon [Thu, 1 Dec 2005 21:15:54 +0000 (21:15 +0000)]
Do not hold the ifnet serializer when entering tsleep() in the PPP TUN
interface code.  This can deadlock the network protocol threads.

Reported-by: Stefan Krueger
18 years agoFor MPSAFE syscall operation, CURSIG->__cursig->issignal() may be called
Matthew Dillon [Thu, 1 Dec 2005 18:54:20 +0000 (18:54 +0000)]
For MPSAFE syscall operation, CURSIG->__cursig->issignal() may be called
without the MP lock held.  At the moment issignal() needs to be MP locked
so wrap the function in the lock.  Note that issignal() is only called if
there is a signal pending so this will not disrupt kern.syscall_mpsafe
operation.

18 years agoThe primary mbuf cluster management code needs to be made MPSAFE since
Matthew Dillon [Thu, 1 Dec 2005 18:40:56 +0000 (18:40 +0000)]
The primary mbuf cluster management code needs to be made MPSAFE since
m_free() is now MPSAFE.  This involves using atomic_*() increment and
decrement for the mbuf cluster ref count and using a serializer if there
is a potential for a double-free (if the ref count is 2 or greater).  The
common code path will tend not to need the serializer unless the interface
is being tapped.

Reported-by: Peter Avalos <pavalos@theshell.com>
18 years agotsleep_interlock() must be called prior to testing the serializer lock
Matthew Dillon [Thu, 1 Dec 2005 18:34:09 +0000 (18:34 +0000)]
tsleep_interlock() must be called prior to testing the serializer lock
state, otherwise a serializer wakeup on another cpu may race our tsleep().

Reported-by: Emiel Kollof <coolvibe@hackerheaven.org>
18 years agoGet rid of the p_stat SZOMB state. p_stat can now only be SIDL, SSLEEP, or
Matthew Dillon [Thu, 1 Dec 2005 18:30:13 +0000 (18:30 +0000)]
Get rid of the p_stat SZOMB state.  p_stat can now only be SIDL, SSLEEP, or
SRUN.  Instead mark zombie processes with a new flag, P_ZOMBIE.  The eproc
code will convert P_ZOMBIE into SZOMB for /bin/ps.

This further isolates the tsleep code from the process status and fixes
a panic when a process in SZOMB tried to tsleep().

Reported-by: Stefan Krueger <skrueger@meinberlikomm.de>
18 years agoFix comment.
Sascha Wildner [Wed, 30 Nov 2005 14:48:54 +0000 (14:48 +0000)]
Fix comment.

18 years agounbreak LINT building
Sepherosa Ziehau [Wed, 30 Nov 2005 13:35:24 +0000 (13:35 +0000)]
unbreak LINT building

18 years ago- Fix wrong table size (which resulted in the descriptions being off by
Sascha Wildner [Wed, 30 Nov 2005 08:25:07 +0000 (08:25 +0000)]
- Fix wrong table size (which resulted in the descriptions being off by
  one in the menu).

- Change description of sysid #165 from 'FreeBSD' to 'DF/FBSD' since we
  share it with FreeBSD.

18 years agoupgrade_etc: remove altqd and network scripts too, which have been around
YONETANI Tomokazu [Wed, 30 Nov 2005 06:23:52 +0000 (06:23 +0000)]
upgrade_etc: remove altqd and network scripts too, which have been around
for a while but removed in CVS HEAD.

18 years agoJumbo mbuf mangement's extbuf callbacks must be MPSAFE. Use a serializer
Matthew Dillon [Tue, 29 Nov 2005 19:56:56 +0000 (19:56 +0000)]
Jumbo mbuf mangement's extbuf callbacks must be MPSAFE.  Use a serializer
to accomplish the task.  This is a workaround until we create a generic
mbuf management API for jumbo frames.

18 years agoipw (is the only driver that) needs a working interrupt to perform
Matthew Dillon [Tue, 29 Nov 2005 19:55:02 +0000 (19:55 +0000)]
ipw (is the only driver that) needs a working interrupt to perform
initialization.  This means we have to release the serializer across
the tsleep.  The code must additionally be MP Safe.

Reported-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
18 years agoProperly serialize IPW.
Matthew Dillon [Tue, 29 Nov 2005 17:15:56 +0000 (17:15 +0000)]
Properly serialize IPW.

Reported-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
With-help-from: Hiten Pandya <hmp@backplane.com>

18 years agoSync zoneinfo database with tzdata2005o from elsie.
Sascha Wildner [Tue, 29 Nov 2005 08:54:32 +0000 (08:54 +0000)]
Sync zoneinfo database with tzdata2005o from elsie.

asia:           7.86 -> 7.88
northamerica:   7.80 -> 7.82
southamerica:   7.62 -> 7.63

From the announcement:

"These incorporate the Georgia, Cuba, Nicaragua, and Jordan changes
 circulated over the past two weeks by Paul Eggert on the time zone
 mailing list."

18 years agoFix mdoc errors exising at least since the beginning of time (1991 import).
Simon Schubert [Mon, 28 Nov 2005 17:43:46 +0000 (17:43 +0000)]
Fix mdoc errors exising at least since the beginning of time (1991 import).

Spotted-by: corecode
mdoc-clue: swildner