Commit Graph

35969 Commits

Author SHA1 Message Date
David Xu
ddc4f28155 suspend thread only when it can be interrupted. 2002-10-25 13:12:36 +00:00
David Xu
0cf609706f let thread_schedule_upcall() handle idle kse. 2002-10-25 12:50:31 +00:00
Poul-Henning Kamp
fa669ab7b8 Disable the kernacc() check in mtx_validate() until such time that kernacc
does not require Giant.

This means that we may miss panics on a class of mutex programming bugs,
but only if running with a Chernobyl setting of debug-flags.

Spotted by:	Pete Carah <pete@ns.altadena.net>
2002-10-25 08:40:20 +00:00
Poul-Henning Kamp
0d6dc414b4 In vrele() we can actually have a VCHR with v_rdev == NULL if we
came from the bottom of addaliasu().  Don't panic.
2002-10-25 07:58:25 +00:00
Julian Elischer
de4723f6e8 fix style-o 2002-10-25 07:17:07 +00:00
Julian Elischer
9d10277721 More work on the interaction between suspending and sleeping threads.
Also clean up some code used with 'single-threading'.

Reviewed by:	davidxu
2002-10-25 07:11:12 +00:00
Warner Losh
d793791855 Use the correct values for LDBL_*. Libc doesn't completely support
long doubles at the moment (printf truncates them to doubles).
However, long doubles to appear to work to the ranges listed in this
commit on both -stable (4.5) and -current.  There may be some slight
rounding issues with long doubles, but that's an orthogonal issue to
these constants.

I've had this in my local tree for 3 months, and in my company's local
tree for 15 months with no ill effects.

Obtained from: NetBSD
Not likely to like it: bde
2002-10-25 07:02:52 +00:00
Jake Burkholder
81784fad7a Minor cleanups.
- use fields in sysent instead of PS_STRINGS
- set TSTATE_PRIV in frame0.tf_tstate for what its worth
2002-10-25 06:26:34 +00:00
Kirk McKusick
9ab73fd11a Within ufs, the ffs_sync and ffs_fsync functions did not always
check for and/or report I/O errors. The result is that a VFS_SYNC
or VOP_FSYNC called with MNT_WAIT could loop infinitely on ufs in
the presence of a hard error writing a disk sector or in a filesystem
full condition. This patch ensures that I/O errors will always be
checked and returned.  This patch also ensures that every call to
VFS_SYNC or VOP_FSYNC with MNT_WAIT set checks for and takes
appropriate action when an error is returned.

Sponsored by:   DARPA & NAI Labs.
2002-10-25 00:20:37 +00:00
David Xu
4c40dcd4d7 fix typo. 2002-10-25 00:13:46 +00:00
Julian Elischer
1434d3fe6f Extract out KSE specific code from machine specific code
so that there is ony one copy of it. Fix that one copy
so that KSEs with no mailbox in a KSE program are not a cause
of page faults (this can legitmatly happen).

Submitted by:	(parts) davidxu
2002-10-24 23:09:48 +00:00
Maxime Henrion
d28e8b3a0d Oops, forgot to commit this file. This is part of the fix
for ipfw2 panics on sparc64.
2002-10-24 22:32:13 +00:00
Poul-Henning Kamp
ed1ebb9691 Use a better test to prevent tasting geom.ctl so we don't screw the
regression tests.
2002-10-24 21:32:49 +00:00
Poul-Henning Kamp
a2fb4feded Fix the spechash lock order reversal by keeping an updated sum
of v_usecount in the dev_t which vcount() can return without
locking any vnodes.

Seen by:	jhb
2002-10-24 19:38:56 +00:00
Poul-Henning Kamp
7c0c26b4c4 Make sure GEOM has stopped rattling the disks before we try to mount
the root filesystem, this may be implicated in the PC98 issue.
2002-10-24 19:26:08 +00:00
Poul-Henning Kamp
d3eaf40966 Don't taste the first provider, it's /dev/geom.ctl and it's not going
to taste like anything we like anyway.
2002-10-24 19:20:28 +00:00
John Baldwin
0f8e01f117 Oops, I missed a few changes in 'device acpica' -> 'device acpi' change.
Submitted by:	Hiten Pandya <hiten@angelica.unixdaemons.com>
2002-10-24 19:17:06 +00:00
John Baldwin
d2ec391b39 Rename 'device acpica' to 'device acpi'.
Approved by:	msmith, iwasaki
2002-10-24 19:05:04 +00:00
Maxime Henrion
7c697970f4 Fix ipfw2 panics on 64-bit platforms.
Quoting luigi:

In order to make the userland code fully 64-bit clean it may
be necessary to commit other changes that may or may not cause
a minor change in the ABI.

Reviewed by:	luigi
2002-10-24 18:04:44 +00:00
Luigi Rizzo
18f13da2be src and dst address were erroneously swapped in SRC_SET and DST_SET
commands.  Use the correct one. Also affects ipfw2 in -stable.
2002-10-24 18:01:53 +00:00
Poul-Henning Kamp
1f59664b68 Don't try to be cute and save a call/return by implementing a degenerate
vrele() inline.
2002-10-24 17:55:49 +00:00
Robert Watson
eae2f20c47 Provide kernel options for the various MAC policy modules so that
they may be statically linked into the kernel.  Note that statically
linked modules, unlike dynamically linked modules, get INVARIANTS,
so if there are INVARIANTS failures, you'll bump into them rather
than not.  Add the options to NOTES.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 17:21:40 +00:00
Robert Watson
7aab30d1d8 device rc no longer requires a count since jhb newbussified the rc
device driver.
2002-10-24 16:46:53 +00:00
David Xu
33862f40b0 respect TDF_SINTR, also for SINGLE_NO_EXIT threading mode, if a thread
was already suspended, do nothing.
2002-10-24 14:43:48 +00:00
Mitsuru IWASAKI
4690674e12 Add new loader tunable hw.acpi.ec.event_driven so that we control
EcWaitEventIntr()'s behavior.
Some EC controllers require this for working properly (including
sleep/wakeup).
2002-10-24 10:56:33 +00:00
Maxime Henrion
56e77afa59 Fix kernel build on sparc64 in the IPDIVERT case. 2002-10-24 09:58:50 +00:00
David Xu
9991db0cb5 don't forget to remove kse from idle queue. 2002-10-24 09:16:46 +00:00
Julian Elischer
5c8329ed6c Move thread related code from kern_proc.c to kern_thread.c.
Add code to free KSEs and KSEGRPs on exit.
Sort KSE prototypes in proc.h.
Add the missing kse_exit() syscall.

ksetest now does not leak KSEs and KSEGRPS.

Submitted by:	(parts) davidxu
2002-10-24 08:46:34 +00:00
Jeff Roberson
bbee39c629 - Now that uma_zalloc_internal is not the fast path don't be so fussy about
extra function calls.  Refactor uma_zalloc_internal into seperate functions
   for finding the most appropriate slab, filling buckets, allocating single
   items, and pulling items off of slabs.  This makes the code significantly
   cleaner.
 - This also fixes the "Returning an empty bucket." panic that a few people
   have seen.

Tested On:	alpha, x86
2002-10-24 07:59:03 +00:00
Marcel Moolenaar
0761a64f29 o Fix a size calculation based on a 8KB page, while under EFI
pages are 4KB.
o  As a second order fix, don't assume we have enough space
   after the bootinfo block left in a page to hold the memory
   map.
o  A third order fix as that we removed the assumption that a
   bootinfo block fits in a single 8KB page.

PR: ia64/39415
submitted by: Espen Skoglund <esk@ira.uka.de>
2002-10-24 07:53:12 +00:00
Yoshihiro Takahashi
2ca2ca3af6 The rc driver is not needed for pc98. 2002-10-24 07:18:24 +00:00
Marcel Moolenaar
8c7cf505d7 Build the following modules on ia64 as well:
ar, asr, bktr, cardbus, cbb, ep, exca, hea, hfa, ipfilter, lomac,
netgraph, pccard, rc, sound, sppp, vinum.
2002-10-24 07:16:24 +00:00
Jeff Roberson
bba739abf9 - Move the destructor calls so that they are not called with the zone lock
held.  This avoids a lock order reversal when destroying zones.
   Unfortunately, this also means that the free checks are not done before
   the destructor is called.

Reported by:	phk
2002-10-24 06:17:30 +00:00
Kris Kennaway
9670fc7423 Remove gcc-specific optimization/debugging CFLAGS 2002-10-24 03:56:16 +00:00
Robert Watson
51a9219f57 Commit of Makefile missed in earlier pass.
Submitted by:	kuriyama
2002-10-24 02:04:03 +00:00
Ian Dowse
efac726eeb Unbreak the automatic remapping of an INADDR_ANY destination address
to the primary local IP address when doing a TCP connect(). The
tcp_connect() code was relying on in_pcbconnect (actually in_pcbladdr)
modifying the passed-in sockaddr, and I failed to notice this in
the recent change that added in_pcbconnect_setup(). As a result,
tcp_connect() was ending up using the unmodified sockaddr address
instead of the munged version.

There are two cases to handle: if in_pcbconnect_setup() succeeds,
then the PCB has already been updated with the correct destination
address as we pass it pointers to inp_faddr and inp_fport directly.
If in_pcbconnect_setup() fails due to an existing but dead connection,
then copy the destination address from the old connection.
2002-10-24 02:02:34 +00:00
Robert Watson
8c7327e183 Provide a simple sample labeled access control policy, mac_partition.
This policy can be loaded dynamically, and assigns each process a
partition number, as well as permitting processes to operate outside
the partition.  Processes contained in a partition can only "see"
processes inside the same partition, so it's a little like jail.
The partition of a user can be set using the label mechanisms in
login.conf.  This sample policy is a good starting point for developers
wanting to learn about how to produce labeled policies, as it labels
only one kernel object, the process credential.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 23:36:27 +00:00
Robert Watson
5136300015 Provide a simple sample labeled access control policy, mac_partition.
This policy can be loaded dynamically, and assigns each process a
partition number, as well as permitting processes to operate outside
the partition.  Processes contained in a partition can only "see"
processes inside the same partition, so it's a little like jail.
The partition of a user can be set using the label mechanisms in
login.conf.  This sample policy is a good starting point for developers
wanting to learn about how to produce labeled policies, as it labels
only one kernel object, the process credential.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 23:36:26 +00:00
Kirk McKusick
c0762674c9 We must be careful to avoid recursive copy-on-write faults when
trying to clean up during disk-full senarios.

Sponsored by:	DARPA & NAI Labs.
2002-10-23 21:47:02 +00:00
John Baldwin
b6ca678e32 We always need sys/pcpu.h now, not just for the SMP case.
Approved by:	jake
2002-10-23 20:18:33 +00:00
Poul-Henning Kamp
bcc4e90a1b Remove NO_GEOM from sparc64.
Reminded by:	jhb
2002-10-23 18:27:37 +00:00
John Baldwin
599c57a971 - New-bussify the rc(4) device driver.
- Add detach support to the driver so that you can kldunload the module.
  Note that currently rc_detach() fails to detach a unit if any of its
  child devices are open, thus a kldunload will fail if any of the tty
  devices are currently open.
- sys/i386/isa/ic/cd180.h was moved to sys/dev/ic/cd180.h as part of
  this change.

Requested by:	rwatson
Tested by:	rwatson
2002-10-23 15:53:09 +00:00
Hidetoshi Shimokawa
3983050934 Don't send/recieve packets when the interface is down. 2002-10-23 15:16:37 +00:00
John Baldwin
08675def10 npx(4) doesn't honor port hints so don't provide an example one. 2002-10-23 14:52:53 +00:00
Hidetoshi Shimokawa
06a93bac4f - Dequeue OCBs more safely in sbp_abort_all_ocbs(). 2002-10-23 13:04:02 +00:00
Yoshihiro Takahashi
43b6e2a273 MFi386: revision 1.10 2002-10-23 12:54:05 +00:00
Poul-Henning Kamp
0eb5dd8cc0 Only define SEEK_{SET,CUR,END} if not already defined (by <stdio.h>) 2002-10-23 12:13:10 +00:00
Dag-Erling Smørgrav
f2c1ea8152 Whitespace cleanup. 2002-10-23 10:26:54 +00:00
Mark Murray
64f82235d8 Very minor whitespace/style nit. 2002-10-23 10:14:30 +00:00
Mark Murray
54b2b8a758 Put parentheses around function-like macros to shut up warnings. 2002-10-23 10:12:12 +00:00