Commit Graph

54171 Commits

Author SHA1 Message Date
jwd
5b5ea05060 Check return code from login_tty. Allow getty to try and become
a daemon and session leader (thus allowing getty to be run from
a shell command line or script).

Partially Reviewed by:	bde
2000-11-19 02:10:25 +00:00
jwd
0b41e34c3e Add/fix the ability to split a file larger than 2 gigabytes.
Added $FreeBSD tag (in the way the already present sccsid is
done). I've been told the rcsid stuff may be of dubious value
so I'm curious to know if folks (still) use it.

Submitted by:	Brad Chisholm <blc@bsdwins.com>
2000-11-19 01:44:20 +00:00
dillon
54d2fd2d6a Implement a low-memory deadlock solution.
Removed most of the hacks that were trying to deal with low-memory
    situations prior to now.

    The new code is based on the concept that I/O must be able to function in
    a low memory situation.  All major modules related to I/O (except
    networking) have been adjusted to allow allocation out of the system
    reserve memory pool.  These modules now detect a low memory situation but
    rather then block they instead continue to operate, then return resources
    to the memory pool instead of cache them or leave them wired.

    Code has been added to stall in a low-memory situation prior to a vnode
    being locked.

    Thus situations where a process blocks in a low-memory condition while
    holding a locked vnode have been reduced to near nothing.  Not only will
    I/O continue to operate, but many prior deadlock conditions simply no
    longer exist.

Implement a number of VFS/BIO fixes

	(found by Ian): in biodone(), bogus-page replacement code, the loop
        was not properly incrementing loop variables prior to a continue
        statement.  We do not believe this code can be hit anyway but we
        aren't taking any chances.  We'll turn the whole section into a
        panic (as it already is in brelse()) after the release is rolled.

	In biodone(), the foff calculation was incorrectly
        clamped to the iosize, causing the wrong foff to be calculated
        for pages in the case of an I/O error or biodone() called without
        initiating I/O.  The problem always caused a panic before.  Now it
        doesn't.  The problem is mainly an issue with NFS.

	Fixed casts for ~PAGE_MASK.  This code worked properly before only
        because the calculations use signed arithmatic.  Better to properly
        extend PAGE_MASK first before inverting it for the 64 bit masking
        op.

	In brelse(), the bogus_page fixup code was improperly throwing
        away the original contents of 'm' when it did the j-loop to
        fix the bogus pages.  The result was that it would potentially
        invalidate parts of the *WRONG* page(!), leading to corruption.

	There may still be cases where a background bitmap write is
        being duplicated, causing potential corruption.  We have identified
        a potentially serious bug related to this but the fix is still TBD.
        So instead this patch contains a KASSERT to detect the problem
  	and panic the machine rather then continue to corrupt the filesystem.
	The problem does not occur very often..  it is very hard to
	reproduce, and it may or may not be the cause of the corruption
	people have reported.

Review by: (VFS/BIO: mckusick, Ian Dowse <iedowse@maths.tcd.ie>)
Testing by: (VM/Deadlock) Paul Saab <ps@yahoo-inc.com>
2000-11-18 23:06:26 +00:00
dillon
7f80666dcb Add the splvm()'s suggested in PR 20609 to protect vm_pager_page_unswapped().
The remainder of the PR is still open.

PR: kern/20609 (partial fix)
2000-11-18 21:11:23 +00:00
dillon
1f9b705709 This patchset fixes a large number of file descriptor race conditions.
Pre-rfork code assumed inherent locking of a process's file descriptor
    array.  However, with the advent of rfork() the file descriptor table
    could be shared between processes.  This patch closes over a dozen
    serious race conditions related to one thread manipulating the table
    (e.g. closing or dup()ing a descriptor) while another is blocked in
    an open(), close(), fcntl(), read(), write(), etc...

PR: kern/11629
Discussed with: Alexander Viro <viro@math.psu.edu>
2000-11-18 21:01:04 +00:00
ben
083e959e15 Fix typo.
PR:		22923
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:19:26 +00:00
ben
f30312cb16 Fix typos.
PR:		22922
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:18:34 +00:00
ben
a68ca673e3 Fix another typo.
PR:		22924
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-18 20:16:47 +00:00
ru
a925d55d3f While in the SYNOPSIS section, Nm macro always required an
argument to setup indentation for the rest of the synopsis
line and to automatically emit a line break for a non-first
synopsis line.  It does not require it anymore.

The following now works as expected:

.Sh NAME
.Nm utility
.Sh SYNOPSIS
.Nm
.Cm start
.Nm
.Cm stop
2000-11-18 17:34:55 +00:00
ru
1f9947b67d mdoc(7) police: fix errors uncovered by the new feature of the Nm macro. 2000-11-18 15:50:46 +00:00
dwmalone
edc447e3da Further use of M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	msmith
2000-11-18 15:21:22 +00:00
dwmalone
88173fb55b Add the use of M_ZERO to netgraph.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Submitted by:	archie
Approved by:	archie
2000-11-18 15:17:43 +00:00
ru
7ec1a7afcd mdoc(7) police: now that Nm macro accepts punctuation characters
as argument, unbreak this page by escaping the `[' character.

Noticed by:	sheldonh
2000-11-18 14:44:30 +00:00
sos
269c27ccd5 Fix a braino .. 2000-11-18 12:14:35 +00:00
cg
aea0875b7b do not blindly assume 8khz is supported on open(). try for 8khz but respect
minspeed/maxspeed specified by the hw driver.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
2000-11-18 03:43:04 +00:00
obrien
86ad942d23 Make the order of values prompted for with the "-i" option match print_part() 2000-11-18 02:55:43 +00:00
bp
72a7d1a37c Use vop_defaultop() instead of ntfs_bypass().
PR:		kern/22756
2000-11-18 02:47:12 +00:00
jhb
16af7af349 Release sched_lock very briefly to give interrupts a chance to fire if we
are in softclock() for a long time.  The old code already did an
splx()/slphigh() pair here, I just missed adding in the equivalent mutex
operations on sched_lock earlier.
2000-11-18 00:21:00 +00:00
tegge
fb67b72282 Don't attempt to cluster write buffers where the VMIO flag isn't set. 2000-11-17 23:40:08 +00:00
des
0f986d8077 Make sure we don't cross stripe boundaries when reviving striped plexes.
This makes crash recovery work for stripe sizes that are not multiples of
DEFAULT_REVIVE_BLOCKSIZE (currently 64 kB).
While we're here, fix a few cosmetic nits.

Reviewed by:	grog
Sponsored by:	Enitel ASA (http://www.enitel.no/)
2000-11-17 23:40:01 +00:00
mph
c8d4ff2f01 "minute(s) period(s)" --> "minute(s)" 2000-11-17 23:08:03 +00:00
obrien
67b277d61a Fix the `make -jX' (X>1) breakage.
Based on patch submitted by:	Makoto MATSUSHITA <matusita@jp.freebsd.org>
Reviewed by:	marcel, bde
2000-11-17 21:25:15 +00:00
jake
87763ac61f - Split the run queue and sleep queue linkage, so that a process
may block on a mutex while on the sleep queue without corrupting
it.
- Move dropping of Giant to after the acquire of sched_lock.

Tested by:	John Hay <jhay@icomtek.csir.co.za>
		jhb
2000-11-17 18:09:18 +00:00
bmah
6ff7fe2b11 Reference security advisories FreeBSD-SA-00:{68,69,70}. 2000-11-17 17:48:40 +00:00
jhb
883a12555a - Change extra sanity checks in cpu_switch() to be conditional on INVARIANTS
instead of DIAGNOSTIC.
- Remove the p_wchan check as it no longer applies since a process may be
  switched out during CURSIG() within msleep() or mawait().
- Remove an extra sanity check only needed during the early SMPng work.
2000-11-17 17:37:43 +00:00
ru
3f0ed120e1 mdoc(7) police: Nm is a must in the NAME section. 2000-11-17 17:11:26 +00:00
ru
f2fc48cb46 Return to the stock version of this file as local FreeBSD mods
to it have been made in mdoc(7) format, but now it is again in
man(7) format, and the vendor apparently incorporated our mods.
2000-11-17 16:30:34 +00:00
ru
aca5e750d7 mdoc(7) police: eliminate warnings. 2000-11-17 15:40:57 +00:00
ru
8ab24fd9fe Fixed Nm macro so that it accepts punctuation characters as argument.
For example, neither of the following worked before:

     .Nm ,       name,
     .Nm .       name.
     .Nm :       name:
     .Dq Nm      ``name''
     .Op Nm .    [name].
2000-11-17 15:30:41 +00:00
ru
77559ae015 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
ben
0fafa1daf2 Fix typos.
PR:		22901, 22902
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-17 09:16:29 +00:00
msmith
5b5c1d2cff The default kernel filename is "kernel" again, not "kernel.ko".
Submitted by:	mckusick
2000-11-17 04:43:56 +00:00
msmith
aada6e0c0d Add the 'gdt' and 'gdtd' devices for the ICP Vortex RAID controller family. 2000-11-17 01:36:34 +00:00
brian
9db1810977 Go back to populating data_len in struct ngpppoe_init_data. 2000-11-16 23:15:42 +00:00
brian
e4b0b74d23 Go back to using data_len in struct ngpppoe_init_data after discussions
with Julian and Archie.

Implement a new ``sizedstring'' parse type for dealing with field pairs
consisting of a uint16_t followed by a data field of that size, and use
this to deal with the data_len and data fields.

Written by:		Archie with some input by me
Agreed in principle by:	julian
2000-11-16 23:14:53 +00:00
deischen
dca520f65d Fix a bug where a statically initialized condition variable
was not getting properly initialized in pthread_cond_signal()
and pthread_cond_broadcast().  Reportedly, this can cause
an application to die.

MFC candidate

Submitted by:	ade
2000-11-16 22:50:33 +00:00
brian
2e12dba4cd Be a bit more precise about what ``nat deny_incoming yes'' does. 2000-11-16 21:50:50 +00:00
jhb
50cf76d922 The recent changes to msleep() and mawait() resulted in timeout() and
untimeout() not being called with Giant in those functions.  For now,
use the sched_lock to protect the callout wheel in softclock() and in
the various timeout and callout functions.

Noticed by:	tegge
2000-11-16 21:20:52 +00:00
marko
c541de30f0 Fix a couple of typos
Approved by:	Warner
2000-11-16 20:18:45 +00:00
wpaul
b8340b08bf When checking the device code in the probe routine, leave the chip in
16-bit mode. Technically, pcn_probe() is destructive because once the
chip goes into 32-bit mode, the only way to get it out again is a
hardware reset. And once the device is in 32-bit mode, the lnc driver
won't be able to talk to it. So if pcn_probe() is called before the
lnc probe routine, and pcn_probe() rejects the chip as one it doesn't
support, the lnc driver will be SOL.

I don't like this. I think it's a design flaw that you can't switch
the chip out of 32-bit mode once it's selected. The only 'right'
solution is for the pcn driver to support all of the PCI devices
in 32-bit mode, however I don't have samples of all the PCnet series
cards for testing.
2000-11-16 19:56:09 +00:00
deischen
803e514e35 Delete 4 lines of misleading/incorrect comments. 2000-11-16 19:15:56 +00:00
ru
93d2b0a39d Make the question mark (`?') a valid punctuation character.
One can now, for example, write:

.Sh EXAMPLES
Have you read the
.Xr mdoc 7 ?
.Pp
Do you like
.Fx ?

The mdoc.samples(7) page has been automatically updated to
record this change.
2000-11-16 17:04:14 +00:00
archie
01e77282a8 Add kernel option NETGRAPH_ONE2MANY. 2000-11-16 16:59:26 +00:00
ru
8191850393 Fix problem with extra space after an Xr, because aZ was being called twice.
Fix the no-space-after-a-period-in-macro problem.

Obtained from:	NetBSD
2000-11-16 16:05:13 +00:00
imp
bbf0481274 vx is now optional rather than taking a count. Reflect that in the
files.  Also a minor white space nit.

Submitted by: bde
2000-11-16 15:16:41 +00:00
ru
84ae852943 mdoc(7)ify. 2000-11-16 13:21:17 +00:00
ru
b9140212f2 Describe -deny_incoming better, highlight some keywords,
add myself to the AUTHORS section.
2000-11-16 12:20:54 +00:00
ben
1e5a6812e6 fix typo; compliment -> complement.
PR:		22840
Submitted by:	Jimmy Olgeni <olgeni@uli.it>
2000-11-16 12:19:19 +00:00
ben
e4a3e1b733 remove trailing fullstop from SEE ALSO.
Reviewed by:	grog
2000-11-16 11:42:11 +00:00
ru
abdb726802 Replace a dagger' sign with a double dagger' one.
The former looks ugly on grotty(1) devices.
2000-11-16 11:22:42 +00:00