Commit Graph

47710 Commits

Author SHA1 Message Date
phk
4972a55ba2 Add a tty-independent include file for definitions pertaining to serial
ports.

Define the most commonly used modem signals, and delta-bit definitions
for them.
2004-06-24 10:05:58 +00:00
njl
4e2f43832b Update some comments and remove non-standard notation. 2004-06-24 06:37:23 +00:00
njl
4259b2bf62 Hook acpi_quirks up to the build for kernel and modules. 2004-06-24 06:29:22 +00:00
njl
7f22999cba Add a script to parse acpi_quirks into a header file that we can compile
into ACPI.  Script written by Mark Santcroos with some edits from myself.

Submitted by:	marks
2004-06-24 06:28:05 +00:00
njl
634b35494e Add a quirks array based on matching ACPI tables. The entries in this file
are currently all bad BIOS revisions that will never be able to support
ACPI.  They were derived by examining which BIOS's are blacklisted by other
operating systems.  Other types of quirks will be possible here as well.
2004-06-24 06:27:05 +00:00
jb
dfc6d273f2 Sync to usbdevs 1.183 2004-06-24 05:25:04 +00:00
jb
40584751b2 Add Delorme Publishing Earthmate GPS 2004-06-24 05:05:56 +00:00
rwatson
e9710722fa Acquire the receive socket buffer lock when modifying out-of-band
data fields of the socket in SPX.
2004-06-24 04:29:53 +00:00
rwatson
5b148b0cd4 Lock socket buffers when processing setting socket options SO_SNDLOWAT
or SO_RCVLOWAT for read-modify-write.
2004-06-24 04:28:30 +00:00
rwatson
856e57e291 Annotate so_error as being used for simple assignment and reads, and
therefore not locked.

Assert the socket buffer lock in sowwakeup_locked() to match
sorwakeup_locked().
2004-06-24 04:27:10 +00:00
alc
a96a1d58f7 Call vm_pageout_page_stats() with the page queues lock held. 2004-06-24 04:08:43 +00:00
rwatson
bff787dba3 Introduce a temporary mutex, mac_ifnet_mtx, to lock MAC labels on
network interfaces.  This global mutex will protect all ifnet labels.
Acquire the mutex across various MAC activities on interfaces, such
as security checks, propagating interface labels to mbufs generated
from the interface, retrieving and setting the interface label.

Introduce mpo_copy_ifnet_label MAC policy entry point to copy the
value of an interface label from one label to another.  Use this
to avoid performing a label externalize while holding mac_ifnet_mtx;
copy the label to a temporary ifnet label and then externalize that.

Implement mpo_copy_ifnet_label for various MAC policies that
implement interface labeling using generic label copying routines.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-06-24 03:34:46 +00:00
alc
a035bc6c10 Remove spl calls. 2004-06-24 03:13:30 +00:00
rwatson
933bf044b5 Annotate which SB_ constants are for sb_flags fields. 2004-06-24 03:12:46 +00:00
rwatson
6b9af88e9d When updating sb_flags, acquire the socket buffer lock to prevent
races.
2004-06-24 03:12:13 +00:00
rwatson
0d284628a0 Constify send and receive space constants in natm. 2004-06-24 03:11:29 +00:00
rwatson
72e8ca6e16 Broaden scope of the socket buffer lock when processing an ACK so that
the read and write of sb_cc are atomic.  Call sbdrop_locked() instead
of sbdrop() since we already hold the socket buffer lock.
2004-06-24 03:07:27 +00:00
rwatson
60a4c150d3 Protect so_oobmark with with SOCKBUF_LOCK(&so->so_rcv), and broaden
locking in tcp_input() for TCP packets with urgent data pointers to
hold the socket buffer lock across testing and updating oobmark
from just protecting sb_state.

Update socket locking annotations
2004-06-24 02:57:12 +00:00
obrien
58e58438be Better OFW console support on Sun Ultra2 machines.
Ultra2 users may want to set OFWCONS_POLL_HZ to a value of '20'.
I have left default value at '4' as higher values can consume a more
than is acceptable amount of CPU, and we don't have a consensus yet
what is an optimal value.

Submitted by:	Pyun YongHyeon <yongari@kt-is.co.kr>
2004-06-24 02:57:11 +00:00
csjp
7e172b8cb6 Currently, if the drives specified for volume creation are
not active GEOM providers, it will result in a kernel panic.

If the GEOM provider or disk goes away before the volume
configuration data gets written to the disk, it will result
in another kernel panic.

o Make sure that the drives specified for volume creation
  are active GEOM providers.

o When writing out volume configuration data to associated drives,
  make sure that the GEOM provider is active, otherwise continue
  to the next drive in the volume.

Approved by:	le, bmilekic (mentor)
2004-06-24 02:40:34 +00:00
obrien
73ce2e712d Add casts so all these quantities are a constant type. 2004-06-24 02:24:39 +00:00
obrien
a9732cf4d0 Cast variable-sized (based on platform) quantities before printing out. 2004-06-24 02:21:17 +00:00
rwatson
99412c4858 In ip_ctloutput(), acquire the inpcb lock around some of the basic
inpcb flag and status updates.
2004-06-24 02:05:47 +00:00
rwatson
93baf0b01a When asserting non-Giant locks in the network stack, also assert
Giant if debug.mpsafenet=0, as any points that require synchronization
in the SMPng world also required it in the Giant-world:

- inpcb locks (including IPv6)
- inpcbinfo locks (including IPv6)
- dummynet subsystem lock
- ipfw2 subsystem lock
2004-06-24 02:01:48 +00:00
njl
eba0ce4c5f Attach the correct handle, not the one that was just deleted. Also,
remove some duplicated code.
2004-06-24 01:57:31 +00:00
rwatson
393e3c5d09 Clean up use of ng_hdhasb_mtx a little:
- Assert the mutex in NG_IDHASH_FIND() since the mutex is required to
  safely walk the node lists in the ng_ID_hash table.

- Acquire the ng_nodelist_mtx when walking ng_allnodes or ng_allhooks
  to generate state dump output from the netgraph sysctls.
2004-06-24 01:47:31 +00:00
rwatson
deac06df05 Acquire socket lock in the "waiting for connection" loop in
kern_connect(), replacing tsleep() with msleep() with the socket
mutex.
2004-06-24 01:43:23 +00:00
rwatson
caac080ec9 Introduce sbreserve_locked(), which asserts the socket buffer lock on
the socket buffer having its limits adjusted.  sbreserve() now acquires
the lock before calling sbreserve_locked().  In soreserve(), acquire
socket buffer locks across read-modify-writes of socket buffer fields,
and calls into sbreserve/sbrelease; make sure to acquire in keeping
with the socket buffer lock order.  In tcp_mss(), acquire the socket
buffer lock in the calling context so that we have atomic read-modify
-write on buffer sizes.
2004-06-24 01:37:04 +00:00
rwatson
e71609f557 Slide socket buffer lock earlier in sopoll() to cover the call into
selrecord(), setting up select and flagging the socker buffers as SB_SEL
and setting up select under the lock.
2004-06-24 00:54:26 +00:00
njl
ab7b1075ef Run the power off code directly instead of using indirection through
smp_rendezvous() to ensure we run on the BSP.  This reverts rev 1.128.
Add a comment indicating that MI code should be the one that runs all
shutdown functions on the BSP with the APs halted.  This should work
around problems in power off while waiting for the MI code to be improved.
2004-06-24 00:48:45 +00:00
rwatson
f22a8169c3 Remove spls from portal_open(). Acquire socket lock while sleeping
waiting for the socket to connect and use msleep() on the socket
mute rather than tsleep().  Acquire socket buffer mutexes around
read-modify-write of socket buffer flags.
2004-06-24 00:47:23 +00:00
njl
1f3c0d8118 Use uintmax_t for CPU statistics and add a cast to prevent truncation of
the statistics in a multiply.

Pointed out by:	YONETANI Tomokazu
2004-06-24 00:38:51 +00:00
le
9eb205c8da Add a function to clean up RAID5 packets and use it when I/O has
finished or when building the complete packet fails.
2004-06-23 23:52:55 +00:00
le
b6dc252aa6 Remove two debugging printfs that are currently rather disturbing
than helpful.
2004-06-23 22:32:01 +00:00
bmilekic
7a6a2d65d4 Make uma_mtx MTX_RECURSE. Here's why:
The general UMA lock is a recursion-allowed lock because
there is a code path where, while we're still configured
to use startup_alloc() for backend page allocations, we
may end up in uma_reclaim() which calls zone_foreach(zone_drain),
which grabs uma_mtx, only to later call into startup_alloc()
because while freeing we needed to allocate a bucket.  Since
startup_alloc() also takes uma_mtx, we need to be able to
recurse on it.

This exact explanation also added as comment above mtx_init().

Trace showing recursion reported by: Peter Holm <peter-at-holm.cc>
2004-06-23 21:59:03 +00:00
scottl
51304a50f3 Make the udf_vnops side endian clean. 2004-06-23 21:49:03 +00:00
ps
a6b0bc7ed0 Move the sack sysctl's under net.inet.tcp.sack
net.inet.tcp.do_sack -> net.inet.tcp.sack.enable
net.inet.tcp.sackhole_limit -> net.inet.tcp.sack.sackhole_limit

Requested by:	wollman
2004-06-23 21:34:07 +00:00
le
6c59c5fae6 Accept "sd len 0" and auto-size the subdisk correctly.
Spotted by: csjp
2004-06-23 21:15:55 +00:00
ps
f5f3e8600b Add support for TCP Selective Acknowledgements. The work for this
originated on RELENG_4 and was ported to -CURRENT.

The scoreboarding code was obtained from OpenBSD, and many
of the remaining changes were inspired by OpenBSD, but not
taken directly from there.

You can enable/disable sack using net.inet.tcp.do_sack. You can
also limit the number of sack holes that all senders can have in
the scoreboard with net.inet.tcp.sackhole_limit.

Reviewed by:	gnn
Obtained from:	Yahoo! (Mohan Srinivasan, Jayanth Vijayaraghavan)
2004-06-23 21:04:37 +00:00
scottl
933faf5c3e First half of making UDF be endian-clean. This addresses the vfsops side. 2004-06-23 19:36:09 +00:00
rik
7c1f24f113 Use bus_dma* instead of contigmalloc()+vtophys() for RELENG_5. 2004-06-23 18:13:10 +00:00
jhb
b597657d93 Finally implement bus_config_intr() support for I/O APIC interrupt sources.
This should fix problems with older SMP systems that only have ISA/EISA
IRQs when routing virgin PCI interrupts as well as on other boxes whose
MADT does not have any interrupt override entries for ISA IRQs that are
used to route PCI interrupts even in APIC mode.
2004-06-23 18:11:33 +00:00
jhb
8371bbfa53 Fetch the actual acpi0 device_t and use device_is_attached() to see if
it's alive rather than trying to fetch its softc pointer via its devclass.

Glanced at by:	imp, njl
2004-06-23 17:59:01 +00:00
brooks
33bd77e91b el(4) stopped needing to me a count device in December 2000. 2004-06-23 17:33:25 +00:00
jhb
cb992566ca - Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are
actually used.  For most ACPI devices this means deferring the call
  until bus_alloc_resource().
  - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an
    ACPI IRQ resource using the trigger mode and polarity information
    stored in the ACPI resource object.
  - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ
    resource that corresponds to a specified rid and new-bus resource.
  - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts
    that it routes through link devices.
- Remove needactivate variable from acpi_alloc_resource() by changing the
  function not modify the flags variable but just mask off RF_ACTIVE when
  calling rman_reserve_resource().

Reviewed by:	njl (1, an earlier version)
2004-06-23 17:21:02 +00:00
jhb
22d8e1a72e Various cleanups in support of a future ioapic_config_intr() function:
- Allow ioapic_set_{nmi,smi,extint}() to be called multiple times on the
  same pin so long as the pin's mode is the same as the mode being
  requested.
- Add a notion of bus type for the interrupt associated with interrupt pin.
  This is needed so that we can force all EISA interrupts to be active high
  in the forthcoming ioapic_config_intr().
- Fix a bug for EISA systems that didn't remap IRQs.  This would have broken
  EISA systems that tried to disable mixed mode for IRQ 0.
2004-06-23 15:29:20 +00:00
bms
72f48d5467 In swap_pager_getpages(), bp->b_dev can be NULL, particularly for the
case of NFS mounted swap, so do not try to dereference it.

While we're here, brucify the printf() call which happens when we
time out on acquisition of vm_page_queue_mtx.

PR:		kern/67898
Submitted by:	bde (style)
2004-06-23 15:15:07 +00:00
jhb
a1484e7d3e Now that we associate a device_t with ACPI device handles, lookup the
device associated with any PCI devices that are enumerated in the ACPI
tree when adding children to an ACPI PCI bus and remove the duplicate
ACPI-only device_t and replace the device_t associated with the handle with
the ACPI and PCI aware device_t.
2004-06-23 15:08:40 +00:00
rik
2cce54e339 Clean CLEANFILES. 2004-06-23 14:22:14 +00:00
imp
c5906d37f5 Improve the kludge assignment of sub-bus numbers a little by fixing an
off by one error.  subbus must be > than pribus, so the right test is
<= not just <.

Reported by: Peter Losher
2004-06-23 13:49:46 +00:00
rik
7de2955c80 Make code more clean: backout support for 3.x branch. 2004-06-23 11:23:54 +00:00
le
f3a83f0723 MFNetBSD 1.60, author: augustss
Several changes:
    * Implement read for ulpt.
    * If the device is not opened for reading, occasionally drain any
      data the printer might have (but don't hammer the printer with reads).
    * Lower the buffer size to one page.
   The driver seems to work with more printers now.

Obtained from: NetBSD
2004-06-23 11:16:12 +00:00
phk
347e6a87e3 save a few redundant lines by moving the retry loop further backwards. 2004-06-23 10:28:09 +00:00
phk
7f457c9719 Since we grew struct xtty, t_dev doesn't have to be schizofrenic anymore. 2004-06-23 08:25:23 +00:00
alc
e3b74add64 - Remove unused definitions.
- Move a definition inside the scope of a #ifdef _KERNEL.
2004-06-23 08:06:52 +00:00
bms
2c8e58bd80 MFamd64: Document the machdep.hlt_cpus sysctl MIB variable.
PR:		i386/65729
Submitted by:	Craig Rodrigues
2004-06-23 07:12:34 +00:00
bde
663370f941 Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution in <sys/vnode.h> for the definition
of mutex interfaces used in SOCKBUF_*LOCK().

Sorted includes.

Removed unused includes.
2004-06-23 06:47:49 +00:00
bde
4a8d4eb719 Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution in <sys/vnode.h> for the definition
of GIANT_REQUIRED.

Sorted includes.
2004-06-23 06:35:43 +00:00
alc
a7339dd630 Implement the protection check required by the pmap_extract_and_hold()
specification.  This enables the elimination of Giant from that function.
2004-06-23 04:37:14 +00:00
archie
65fa85e83d Avoid calling bpf_filter() with len == 0, which causes a change in semantics
(it treats the buffer pointer as an mbuf pointer) and subsequent panic.

MFC after:	3 days
Reported by:	Tony Hariman <tony@cbn.net.id>
2004-06-23 02:37:10 +00:00
bms
7e064ac98c Add required includes for post-sorwakeup() change to fix FAST_IPSEC
compilation.
2004-06-23 01:58:22 +00:00
rwatson
083bcb28d6 Remove unlocked read annotation for sbspace(); the read is locked. 2004-06-23 00:35:50 +00:00
bms
00a26380d4 Fix an inconsistency in socket option propagation on accept(). Propagate
the SS_NBIO flag from the parent socket to the child socket during an
accept() operation.

The file descriptor O_NONBLOCK flag would have been propagated already
by the fflag assignment, and therefore would have been inconsistent
with the underlying socket's so_state member.

This makes accept() more closely adhere to the API contract we effectively
outline in the manual page. Note also that Linux continues to differ here;
O_NONBLOCK is not propagated. The other BSDs do propagate the flag, as
does Solaris. The Single UNIX Specification does not offer specific
advice on this issue.

PR:		kern/45733
Requested by:	Jayanth Vijayaraghavan
Reviewed by:	rwatson
2004-06-22 23:58:09 +00:00
obrien
4920eabfa9 Enable 'vinum' on AMD64. 2004-06-22 23:15:01 +00:00
ps
069fb92824 Reset the update flag when scanning for new devices. 2004-06-22 23:05:06 +00:00
brueffer
5775a3d418 Throw out pfsync and pflog, the modules were removed 2004-06-22 22:57:13 +00:00
bms
4e506800d3 Correct a misleading comment regarding the IPSEC_FILTERGIF option.
PR:		57125
Requested by:	Adrian Steinmann
2004-06-22 22:02:57 +00:00
jhb
030ae438f9 Update the copyright to use a 3 clause BSD license rather than one that
is less clear about allowing redistribution of modified copies.

Requested by:	Tom Cosgrove tom dot cosgrove at arches-consulting dot com
2004-06-22 21:55:22 +00:00
jhb
a2fca5d60c Remove a bogus increment of %di when scanning the list of loader paths.
%di will already point to the character after the nul char when the
'repnz scasb' terminates.

Submitted by:	Tom Cosgrove tom dot cosgrove at arches-consulting dot com
2004-06-22 21:52:20 +00:00
bms
e80fd5cfb6 Improve source-code compatibility with Linux applications using the
IPX stack.

PR:		kern/65217
Submitted by:	Radim Kolar
2004-06-22 21:46:49 +00:00
phk
ace6a2a6f7 Remove the TIOCDCDTIMESTAMP option.
The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more
configurable service.
2004-06-22 20:32:17 +00:00
le
5d3555a2f9 Fix a few spelling mistakes in comments and clean them up a bit. 2004-06-22 20:22:24 +00:00
brooks
060c225745 Bump FreeBSD_version for if_clone overhaul. 2004-06-22 20:15:42 +00:00
brooks
e1dd867b55 Major overhaul of pseudo-interface cloning. Highlights include:
- Split the code out into if_clone.[ch].
 - Locked struct if_clone. [1]
 - Add a per-cloner match function rather then simply matching names of
   the form <name><unit> and <name>.
 - Use the match function to allow creation of <interface>.<tag>
   vlan interfaces.  The old way is preserved unchanged!
 - Also the match function to allow creation of stf(4) interfaces named
   stf0, stf, or 6to4.  This is the only major user visible change in
   that "ifconfig stf" creates the interface stf rather then stf0 and
   does not print "stf0" to stdout.
 - Allow destroy functions to fail so they can refuse to delete
   interfaces.  Currently, we forbid the deletion of interfaces which
   were created in the init function, particularly lo0, pflog0, and
   pfsync0.  In the case of lo0 this was a panic implementation so it
   does not count as a user visiable change. :-)
 - Since most interfaces do not need the new functionality, an family of
   wrapper functions, ifc_simple_*(), were created to wrap old style
   cloner functions.
 - The IF_CLONE_INITIALIZER macro is replaced with a new incompatible
   IFC_CLONE_INITIALIZER and ifc_simple consumers use IFC_SIMPLE_DECLARE
   instead.

Submitted by:   Maurycy Pawlowski-Wieronski <maurycy at fouk.org> [1]
Reviewed by:    andre, mlaier
Discussed on:	net
2004-06-22 20:13:25 +00:00
alc
dd32b92c25 Implement the protection check required by the pmap_extract_and_hold()
specification.  This enables the elimination of Giant from that function.

Reviewed by:	tegge@
2004-06-22 19:35:43 +00:00
green
5301d01cba Fix a problem with multiple-delivery (i.e. broadcast) in ng_bridge.
Only the first link0..link$NLINKS hooks would be utilized, whereas
the link hooks may be connected sparsely.

Add a counter variable so that the link hook array is only traversed
while there is still work to do, but that it continues up to the end
if it has to.
2004-06-22 18:56:47 +00:00
le
e2e28b4745 No need to free the softc, because it wasn't allocated. 2004-06-22 18:13:43 +00:00
ps
a1bdd1093e Use the maximum physical bus when rescanning those targets. This
fixes a panic on cards which do not have any drives attached.
2004-06-22 17:39:57 +00:00
bms
211ce911d5 Fix a paste-o in key_cmpspidx_withmask().
PR:		misc/67013
Submitted by:	Zhenmin <zli4@cs.uiuc.edu>
2004-06-22 17:17:44 +00:00
obrien
8abf9484aa Adjust the system endian and a.out headers to be more MI and cross-building
friendly.  Use the systems headers rather than local versions.

Reviewed by:	ru
2004-06-22 17:05:39 +00:00
le
853033de65 Don't sleep in the g_down path. More error checks to come. 2004-06-22 14:54:31 +00:00
nyan
1201cc464b Merged from sys/dev/sio/sio.c revisions 1.439 and 1.440. 2004-06-22 12:12:10 +00:00
nyan
10c838a361 MFi386: revision 1.592. 2004-06-22 12:11:20 +00:00
sos
166655f4a8 Use the right ordering of args on mtx_init(). No functional changes
since the args in question was all zero's.

Found by: Jimmy Olgeni <olgeni@FreeBSD.org>
2004-06-22 11:18:25 +00:00
brueffer
d0a100c886 Fix typos and add spaces before `(' in some comments
Submitted by:	markus
Approved by:	njl
MFC after:	3 days
2004-06-22 08:23:26 +00:00
le
4e3007919c Catch up with g_dev_open() changes and pass over the current thread
pointer.

Submitted by:    cperciva
2004-06-22 06:38:01 +00:00
darrenr
2d6cb6a6f5 revert section of code that calls netisr_queue() to match v1.33 of this file 2004-06-22 05:20:30 +00:00
darrenr
3194e9d627 #ifdef's for FreeBSD are wrong, causing too many variable declaractions to
disappear.
2004-06-22 05:16:29 +00:00
rwatson
c6ebad2a3a Regenerate after updating syscalls.master. 2004-06-22 04:36:25 +00:00
rwatson
498a844902 Mark unlink() as MPSAFE as we now acquire Giant in the unlink()
system call.
2004-06-22 04:34:55 +00:00
rwatson
1d271c7712 Acquire Giant in link() so that the system call can be marked
MPSAFE.  Don't want to acquire Giant in kern_link() sync linux
compat code performs actions requiring Giant prior to calling
kern_link().
2004-06-22 04:34:05 +00:00
rwatson
78c99bbbea Rebuild following marking link() as MPSAFE. 2004-06-22 04:29:59 +00:00
rwatson
761a6e100d Mark link() system call as MPSAFE. 2004-06-22 04:29:27 +00:00
rwatson
8a33376794 Acquire Giant in link() so that we can mark it as MSTD in
syscalls.master.  Don't want to do it in kern_link() since the
Linux emulation code calls kern_link() after performing other
actions requiring Giant.
2004-06-22 04:29:07 +00:00
rwatson
6286ff7bea Mark linux_emul_convpath() as GIANT_REQUIRED. 2004-06-22 04:22:34 +00:00
rwatson
77bf8d2108 Acquire socket lock around frobbing of socket state in divert sockets. 2004-06-22 04:00:51 +00:00
rwatson
6381db6e63 Prefer use of the inpcb as a MAC label source for outgoing packets sent
via divert sockets, when available.
2004-06-22 03:58:50 +00:00
rwatson
935a4c087e Remove spl's from uipc_socket to ease in merging. 2004-06-22 03:49:22 +00:00
darrenr
663a79f78b one too many #endif's from the update broke the build 2004-06-22 02:44:06 +00:00
scottl
16254a8419 Fix another typo in the previous commit. 2004-06-21 23:47:47 +00:00
phk
0033eabc1b Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES. 2004-06-21 22:57:16 +00:00
ps
a5b5031c52 on media exchange, update/rescan the drives. This allows a volume
in a failed stated to come back on-line without a reboot.
2004-06-21 22:57:10 +00:00
darrenr
2a062b2e41 Update ipfilter from 3.4.31 -> 3.4.35. Some important changes:
* block packets that fail to create state table entries
* only allow non-fragmented packets to influence whether or not a logged
  packet is the same as the one logged before.
* correct the ICMP packet checksum fixing up when processing ICMP errors for NAT
* implement a maximum for the number of entries in the NAT table (NAT_TABLE_MAX
  and ipf_nattable_max)
* frsynclist() wasn't paying attention to all the places where interface
  names are, like it should.
* fix comparing ICMP packets with established TCP state where only 8 bytes
  of header are returned in the ICMP error.

MFC after:	1 week
2004-06-21 22:46:36 +00:00
scottl
2c953c0dce Fix typo that somehow crept into the previous commit 2004-06-21 22:42:46 +00:00
kbyanc
1e3cfa985e Update previous commit to:
* Obtain/release schedlock around calls to calcru.
  * Sort switch cases which do not cascade per style(9).
  * Sort local variables per style(9).
  * Remove "superfluous" whitespace.
  * Cleanup handling of NULL uap->tp in clock_getres().  It would probably
    be better to return EFAULT like clock_gettime() does by passing the
    pointer to copyout(), but I presume it was written to not fail on
    purpose in the original code.  I'll defer to -standards on this one.

Reported by:	bde
2004-06-21 22:34:57 +00:00
scottl
95c9bdb62a Add the sysctl node 'kern.sched.name' that has the name of the scheduler
currently in use.  Move the 4bsd kern.quantum node to kern.sched.quantum
for consistency.
2004-06-21 22:05:46 +00:00
phk
bf2fdbaf64 Be BURN_BRIDGES compliant 2004-06-21 21:59:00 +00:00
phk
5d5988e73f Be BURN_BRIDGES compliant. 2004-06-21 21:57:31 +00:00
ps
f0bec239ac There is no need to call ciss_media_accept async anymore since all
notify events are handled in a kthread.
2004-06-21 21:56:57 +00:00
julian
545024cdd9 Mark the thread in an exiting program as inactive.
This is not really used by the process but it's confusing to some
status readers to see zombie processes the "runnin" threads.

Pointed out by: Don Lewis <truckman@FreeBSD.org>
2004-06-21 20:44:02 +00:00
green
acfb823f3f Call the detach function with g_waitfor_event() so that it can access
the GEOM topology.

There are still issues with not detaching from cam correctly such that
upon a device detach there's an invalid pointer dereference from the
later call to cam_rescan().
2004-06-21 20:42:03 +00:00
phk
d0b5788749 Kill g_access_rel() already now before we send it down 5-stable 2004-06-21 20:31:49 +00:00
scottl
3eaa7bd6e0 Add SCSI passthrough support to CISS. This allows devices like tape drives
that are on a CISS bus to be exported up to CAM and made available as normal
devices.  This will typically add one or two buses to CAM, which will be
numbered starting at 32 to allow room for CISS proxy buses.  Also, the CISS
firmware usually hides disk devices, but these can also be exposed as 'pass'
devices if you set the hw.ciss.expose_hidden_physical tunable.

Sponsored by:	Tape Laboratories, Inc.
MFC After: 3 days
2004-06-21 20:18:40 +00:00
phk
44cdf7deb4 Give control devices their own cdevsw{} so that we can eliminate them
from the trafic functions.

Do not use com_addr() when we don't need it.
2004-06-21 20:09:23 +00:00
ps
b3197f553c Revert rev 1.140, it was a bit pre-mature. 2004-06-21 19:01:55 +00:00
ps
58e2cb433b Add a quirk for ciss to stop trying to read the serial number off
of logical volumes.
2004-06-21 18:34:30 +00:00
bde
459a8e3950 Turned off the "calcru: negative time" warning for certain SMP cases
where it is known to detect a problem but the problem is not very easy
to fix.  The warning became very common recently after a call to calcru()
was added to fill_kinfo_thread().

Another (much older) cause of "negative times" (actually non-monotonic
times) was fixed in rev.1.237 of kern_exit.c.

Print separate messages for non-monotonic and negative times.
2004-06-21 17:46:27 +00:00
gad
5bdd18548d Use the correct type (lwpid_t) for ki_tid .
Noticed by:	julian
Approved by:	julian, marcel
2004-06-21 16:41:23 +00:00
bde
747f331358 (1) Removed the bogus condition "p->p_pid != 1" on calling sched_exit()
from exit1().  sched_exit() must be called unconditionally from exit1().
    It was called almost unconditionally because the only exits on system
    shutdown if at all.

(2) Removed the comment that presumed to know what sched_exit() does.
    sched_exit() does different things for the ULE case.  The call became
    essential when it started doing load average stuff, but its caller
    should not know that.

(3) Didn't fix bugs caused by bitrot in the condition.  The condition was
    last correct in rev.1.208 when it was in wait1().  There p was spelled
    curthread->td_proc and was for the waiting parent; now p is for the
    exiting child.  The condition was to avoid lowering init's priority.
    It should be in sched_exit() itself.  Lowering of priorities is broken
    in other ways in at least the 4BSD scheduler, and doing it for init
    causes less noticeable problems than doing it for for shells.

Noticed by:	julian (1)
2004-06-21 14:49:50 +00:00
bde
b65b61b58a Update p_runtime on exit. This fixes calcru() on zombies, and prepares
for not calling calcru() on exit.  calcru() on a zombie can happen if
ttyinfo() (^T) picks one.

PR:		52490
2004-06-21 14:03:38 +00:00
gallatin
ae2a2c5a14 Prevent the rp driver from panic'ing on first access and make at
least the pci device unloadable

- Use ttymalloc() rather than a plain  malloc to allocate the
  rp->rp_tty ttys.  This is now required due to the recent locking
  changes to ttys and prevents a panic due to locking an unitialized
  t_mtx.

- Allow the pci driver to be unloaded.  This involved moving
  the call rp_releaseresource() to the end of rp_pcireleaseresource(),
  since rp_pcireleaseresource() uses ctlp->dev, which is freed
  by rp_releaseresource().

- Allow the generic part of the driver to be unattached by providing
  a hook to cancel timeouts.

Glanced at by: obrien
2004-06-21 13:02:25 +00:00
phk
9c97a4d517 New style functions, kill register keyword. 2004-06-21 12:28:56 +00:00
pjd
78f7239eef Don't hold topology lock while calling g_gate_release().
Found by:	KASSERT()
2004-06-21 09:12:08 +00:00
scottl
05c25483b4 Include module.h
Submitted by:	Koop Mast
2004-06-21 07:27:34 +00:00
rwatson
21164a78ac Merge next step in socket buffer locking:
- sowakeup() now asserts the socket buffer lock on entry.  Move
  the call to KNOTE higher in sowakeup() so that it is made with
  the socket buffer lock held for consistency with other calls.
  Release the socket buffer lock prior to calling into pgsigio(),
  so_upcall(), or aio_swake().  Locking for this event management
  will need revisiting in the future, but this model avoids lock
  order reversals when upcalls into other subsystems result in
  socket/socket buffer operations.  Assert that the socket buffer
  lock is not held at the end of the function.

- Wrapper macros for sowakeup(), sorwakeup() and sowwakeup(), now
  have _locked versions which assert the socket buffer lock on
  entry.  If a wakeup is required by sb_notify(), invoke
  sowakeup(); otherwise, unconditionally release the socket buffer
  lock.  This results in the socket buffer lock being released
  whether a wakeup is required or not.

- Break out socantsendmore() into socantsendmore_locked() that
  asserts the socket buffer lock.  socantsendmore()
  unconditionally locks the socket buffer before calling
  socantsendmore_locked().  Note that both functions return with
  the socket buffer unlocked as socantsendmore_locked() calls
  sowwakeup_locked() which has the same properties.  Assert that
  the socket buffer is unlocked on return.

- Break out socantrcvmore() into socantrcvmore_locked() that
  asserts the socket buffer lock.  socantrcvmore() unconditionally
  locks the socket buffer before calling socantrcvmore_locked().
  Note that both functions return with the socket buffer unlocked
  as socantrcvmore_locked() calls sorwakeup_locked() which has
  similar properties.  Assert that the socket buffer is unlocked
  on return.

- Break out sbrelease() into a sbrelease_locked() that asserts the
  socket buffer lock.  sbrelease() unconditionally locks the
  socket buffer before calling sbrelease_locked().
  sbrelease_locked() now invokes sbflush_locked() instead of
  sbflush().

- Assert the socket buffer lock in socket buffer sanity check
  functions sblastrecordchk(), sblastmbufchk().

- Assert the socket buffer lock in SBLINKRECORD().

- Break out various sbappend() functions into sbappend_locked()
  (and variations on that name) that assert the socket buffer
  lock.  The !_locked() variations unconditionally lock the socket
  buffer before calling their _locked counterparts.  Internally,
  make sure to call _locked() support routines, etc, if already
  holding the socket buffer lock.

- Break out sbinsertoob() into sbinsertoob_locked() that asserts
  the socket buffer lock.  sbinsertoob() unconditionally locks the
  socket buffer before calling sbinsertoob_locked().

- Break out sbflush() into sbflush_locked() that asserts the
  socket buffer lock.  sbflush() unconditionally locks the socket
  buffer before calling sbflush_locked().  Update panic strings
  for new function names.

- Break out sbdrop() into sbdrop_locked() that asserts the socket
  buffer lock.  sbdrop() unconditionally locks the socket buffer
  before calling sbdrop_locked().

- Break out sbdroprecord() into sbdroprecord_locked() that asserts
  the socket buffer lock.  sbdroprecord() unconditionally locks
  the socket buffer before calling sbdroprecord_locked().

- sofree() now calls socantsendmore_locked() and re-acquires the
  socket buffer lock on return.  It also now calls
  sbrelease_locked().

- sorflush() now calls socantrcvmore_locked() and re-acquires the
  socket buffer lock on return.  Clean up/mess up other behavior
  in sorflush() relating to the temporary stack copy of the socket
  buffer used with dom_dispose by more properly initializing the
  temporary copy, and selectively bzeroing/copying more carefully
  to prevent WITNESS from getting confused by improperly
  initialized mutexes.  Annotate why that's necessary, or at
  least, needed.

- soisconnected() now calls sbdrop_locked() before unlocking the
  socket buffer to avoid locking overhead.

Some parts of this change were:

Submitted by:	sam
Sponsored by:	FreeBSD Foundation
Obtained from:	BSD/OS
2004-06-21 00:20:43 +00:00
marcel
d7e5b117c4 Fix the following error:
ld: locore.o: non-pic code with imm relocation against dynamic
	symbol `__gp'

With binutils 2.15, ld(1) defines the implicit/automatic symbol __gp
as a dynamic symbol and thus will now complain when used in a non-PIC
fashion (the immediate relocation used to set the GP register). Resolve
this by defining __gp in the linker script. Make sure __gp is aligned
on a 16-byte boundary.

Note: the 0x200000 magic offset is due to having a 22-bit GP-relative
relocation. The GOT will be accessed with negative offsets from GP.
2004-06-20 22:32:19 +00:00
gad
be237c4660 Fill in the values for the ki_tid and ki_numthreads which have been
added to kproc_info.

PR:		bin/65803  (a tiny part...)
Submitted by:	Cyrille Lefevre
2004-06-20 22:17:22 +00:00
gad
80d13d94af Change the architecture-based setting of KINFO_PROC_SIZE and KI_NSPARE so
that it is a series of alphabetically-ordered #fidef's, from Bruce Evans.
Define two new thread-related values in kproc_info, from Cyrille Lefevre.
Also remove a few values from kproc_info that were not needed, and change
around a few comments, from me.  Changes are combined into a single commit
simply because it is a hassle to make sure that alignments and sizes are
not changed on any platform when modifying kproc_info.
2004-06-20 22:05:41 +00:00
rwatson
01c935b8b8 Include an annotation of NET_{LOCK,UNLOCK}_GIANT() noting that these
calls do not have the same recursion semantics as DROP_GIANT and
PICKUP_GIANT.
2004-06-20 21:49:12 +00:00
rwatson
fabe3e5325 It's now the responsibility of the consumer of soabort() to remove a
socket from its accept queue when aborting it during a new inbound
connection.  Update spx_input() to acquire the accept lock, assert
the condition of the socket on its parent queue, and approriately
disconnect it from the queue before calling soabort() on it.
2004-06-20 21:47:12 +00:00
rwatson
8a0f58ccf0 If debug.mpsafenet is set, initialize TCP callouts as CALLOUT_MPSAFE. 2004-06-20 21:44:50 +00:00
rwatson
ffabeb7229 In uipc_rcvd(), lock the socket buffers at either end of the UNIX
domain sokcet when updating fields at both ends.

Submitted by:	sam
Sponsored by:	FreeBSD Foundation
2004-06-20 21:43:13 +00:00
rwatson
e9c176f247 Annotate so_state as locked with SOCK_LOCK(so).
Add a commenting indicating that the SB_ constants apply to sb_flags.
2004-06-20 21:39:46 +00:00
rwatson
8c7c75cc62 Hold SOCK_LOCK(so) when frobbing so_state when disconnecting a
connected UNIX domain datagram socket.
2004-06-20 21:29:56 +00:00
wpaul
0d2c5309ad Remove one more unneeded reference to arpcom.ac_netgraph.
Tweak things so that ng_fec has a chance of working with things
other than ethernet. Use ifp->if_output of the underlying interfaces
and use IF_HANDOFF() rather than depending on ether_output() and
ether_output_frame() explicitly. Also, don't insist that underlying
devices be IFM_ETHER when checking their link states in the link
monitor code.

With these changes, I was able to create a two channel bundle
consisting of one ethernet interface and one 802.11 wireless
device (via ndis). Note that this only works because both devices
use the same if_output vector: ng_fec will not let you bundle
devices with different output vectors together (it really doesn't
make sense to do that).
2004-06-20 21:08:58 +00:00
alc
1450b79b4f - Simplify pmap_remove_pages(), eliminating unnecessary indirection.
- Simplify the locking of pmap_is_modified() by converting control flow to
   data flow.
2004-06-20 20:57:06 +00:00
rwatson
6da2beab7f Assert the inpcb lock before letting MAC check whether we can deliver
to the inpcb in tcp_input().
2004-06-20 20:17:29 +00:00
rwatson
c2888023eb IP multicast code no longer needs to acquire Giant before appending
an mbuf onto a socket buffer.  This is left over from debug.mpsafenet
affecting the forwarding/bridging plane only.
2004-06-20 20:10:05 +00:00
wpaul
8bb4224595 Stash our node context pointer somewhere else within struct ifnet of
underlying interfaces rather than using ac_netgraph in struct arpcom.
The latter is meant only for use by ng_ether, and using it breaks
interoperability with the rest of netgraph.
2004-06-20 19:22:22 +00:00
rwatson
e1348f0140 When retrieving the SO_LINGER socket option for user space, hold the
socket lock over pulling so_options and so_linger out of the socket
structure in order to retrieve a consistent snapshot.  This may be
overkill if user space doesn't require a consistent snapshot.
2004-06-20 17:50:42 +00:00
rwatson
d77a417b71 Convert an if->panic in soclose() into a call to KASSERT(). 2004-06-20 17:47:51 +00:00
markm
ae932b023a Give zlib the ability to be a module that can be depended on,
in the MODULE_DEPEND() sense.
2004-06-20 17:42:35 +00:00
rwatson
1183f24cde Annotate some ordering-related issues in solisten() which are not yet
resolved by socket locking: in particular, that we test the connection
state at the socket layer without locking, request that the protocol
begin listening, and then set the listen state on the socket
non-atomically, resulting in a non-atomic cross-layer test-and-set.
2004-06-20 17:38:19 +00:00
rwatson
c2c08bfea9 Annotate two intentionally unlocked reads with comments.
Annotate a potentially inconsistent result returned to user space when
performing fstaT() on a socket due to not using socket buffer locking.
2004-06-20 17:35:50 +00:00
tmm
2dca765b97 Initialize ni_cnd.cn_cred before calling lookup() (this is normally done
by namei(), which cannot easily be used here however). This fixes boot
time crashes on sparc64 and probably other platforms.

Reviewed by:	phk
2004-06-20 17:31:01 +00:00
josef
e7c4cf7270 Document the possibility of setting default values for
mixer channels via boot loader.
2004-06-20 15:58:24 +00:00
josef
95e075acdf Enable pcm to read kenv variables to set default values for
mixer channels.

e.g.: pcm0.line=0

to muten input line per default.

Approved by:    cg
Reviewed by:    le, stefanf
Requested by:   Eugene Grosbein <eugen@grosbein.pp.ru> (implicitly)
PR:             kern/63771
2004-06-20 15:38:11 +00:00
le
b427022273 MFNetBSD 1.15, author: mycroft
Fix an unimportant typo.
2004-06-20 15:32:19 +00:00
markm
850ccbe37b Micro-tweaking. 2004-06-20 13:50:50 +00:00
alc
d711478366 Add pmap locking to pmap_is_prefaultable(). 2004-06-20 06:11:00 +00:00
bde
da4e7c693b Backed out previous commit. Blind substitution of dev_t by `struct cdev *'
was just wrong here because the dev_t's are user dev_t's.
2004-06-20 03:52:50 +00:00
bde
b84441dcdf Fixed misformatting of code and breaking of a comment in previous commit. 2004-06-20 03:36:31 +00:00
bde
973a864f7e Fixed misformatting in previous commit. 2004-06-20 03:34:21 +00:00
bde
61308bc09f Backed out previous commit. The dev_t -> `struct cdev *' changes have
lots of errors.  Blind substitution of "dev_t foo" by "struct cdev *foo"
in comments usually just created an English syntax error (e.g.,
"struct cdev *changes"), but here it did less than that since the dev_t
is a user dev_t.
2004-06-20 03:11:19 +00:00
gad
f83481b547 Add a call to calcru() to update the kproc_info fields of ki_rusage.ru_utime
and ki_rusage.ru_stime.  This greatly improves the accuracy of those fields.

Suggested by:	bde
2004-06-20 02:03:33 +00:00
bde
8f6039173c Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including the
former, not after.
2004-06-20 00:33:14 +00:00
bde
ffba897cc7 Clear any pending exceptions before using frstor (in the non-FXSR case)
in npxsetregs() too.  npxsetregs() must overwrite the previous state, and
it is never paired with an npxgetregs() that would defuse the previous
state (since npxgetregs() would have fninit'ed the state, leaving nothing
to do).

PR:		68058 (this should complete the fix)
Tested by:	Simon Barner <barner@in.tum.de>
2004-06-19 22:24:16 +00:00
sanpei
9aedd7799e Sync to 1.182 of usbdevs 2004-06-19 22:17:34 +00:00
sanpei
6042953b4c Add support Microtune Bluetooth dongle
PR:		kern/68049
Submitted by:	Markus Brueffer <markus@brueffer.de>
2004-06-19 22:16:03 +00:00
cognet
50ab7a0a58 Fix compilation for Xscale. 2004-06-19 20:50:50 +00:00
alc
4a80a06c52 Remove dead code related to pv entry allocation.
Reviewed by:	marcel@
2004-06-19 20:31:49 +00:00
alc
72c4b0bd2f Remove unused pt_entry_ts. Remove an unneeded semicolon. 2004-06-19 19:09:08 +00:00
marcel
ce6c7857d6 Define __lwpid_t as an int32_t in <sys/_types.h> and define lwpid_t
as an __lwpid_t in <sys/types.h>. Retype td_tid from an int to a
lwpid_t and change related definitions accordingly.
2004-06-19 17:58:32 +00:00
cognet
c959b76977 Include sys/module.h. 2004-06-19 17:38:32 +00:00
cognet
3ef0ec5c27 I happened to have a sys/pool.h file in my tree, but most people do not,
so nuke this useless include.
2004-06-19 17:37:47 +00:00
bde
e041a584a6 Include <sys/_lock.h>'s prerequisite <sys/queue.h> before including the
former, not after.

Don't hide this bug by including <sys/queue.h> in <sys/_lock.h>.
2004-06-19 14:58:35 +00:00
tjr
8fd212e66e When no fixed address is given in a shmat() request, pass a hint address
to vm_map_find() that is less likely to be outside of addressable memory
for 32-bit processes: just past the end of the largest possible heap.
This is the same hint that mmap() uses.
2004-06-19 14:46:13 +00:00
gad
3f2ff133b4 Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,
ki_childutime, and ki_emul.  Also uses the timevaladd() routine to
correct the calculation of ki_childtime.  That will correct the value
returned when ki_childtime.tv_usec > 1,000,000.

This also implements a new KERN_PROC_GID option for kvm_getprocs().
(there will be a similar update to lib/libkvm/kvm_proc.c)

Submitted by:	Cyrille Lefevre
2004-06-19 14:03:00 +00:00
gad
661f0f568c Add some more fields to the 'struct kinfo_proc', including some fields
which just mark areas which are empty due to issues with the alignment
of already-existing fields.  This defines several unrelated variables
in one shot, because most of the work for updating kinfo_proc is making
sure the sizeof(struct kinfo_proc) remains the same across all hardware
platforms, and that no space is wasted on any platform due to alignment
issues with the new variables.

Submitted by:	some by Cyrille Lefevre, some by me
2004-06-19 13:49:25 +00:00
gad
3c7473abf2 Define a KERN_PROC_GID option for kvm_getprocs().
Submitted by:	Cyrille Lefevre
2004-06-19 13:42:05 +00:00
bde
c2ef21d1d4 Removed foot-shooting setting of CR0_TS in exec_setregs(). It is
unnecessary because cpu_setregs() and/or npxinit() always sets CR0_TS
during system initialization, and CR0_TS is set in the next statement
(fpstate_drop()) if necessary after system initialization.  Setting
it unnecessarily was less than a pessimization since it broke the
invariant that the npx can be used without an npxdna() trap if
fpucurthread is non-null.  The broken invariant became harmful when I
added an fnclex to npxdrop().

Removed setting of CR0_MP in exec_setregs().  This was similarly
unnecessary but was harmless.

Updated comments (mainly by removing them).  Things are simpler now
that we have cpu_setregs() and don't support a math emulator or pretend
to support not having either a math emulator or an npx.

Removed the ifdef for avoiding setting CR0_NE in the !SMP case in
cpu_setregs().  npx_probe() should reverse the setting if it wants to
force IRQ13 exception handling for testing.
2004-06-19 12:28:48 +00:00
phk
3237babd8b Only initialize f_data and f_ops if nobody else did so already. 2004-06-19 11:41:45 +00:00
phk
1ce305fbfd Explicitly initialize f_data and f_vnode to NULL.
Report f_vnode to userland in struct xfile.
2004-06-19 11:40:08 +00:00
phk
9695efd3c3 Add the f_vnode pointer to struct xfile, shortly it will no longer be
identical to f_data by definition.
2004-06-19 11:38:00 +00:00
phk
07d9a77b87 Duplicate the securelevel check from spec_vnops.c here. 2004-06-19 09:00:53 +00:00
alc
6edd95aba5 Remove spl() calls. Update comments to reflect the removal of spl() calls.
Remove '\n' from panic() format strings.  Remove some blank lines.
2004-06-19 04:19:47 +00:00
rwatson
e5f4cab982 Assert socket buffer lock in sb_lock() to protect socket buffer sleep
lock state.  Convert tsleep() into msleep() with socket buffer mutex
as argument.  Hold socket buffer lock over sbunlock() to protect sleep
lock state.

Assert socket buffer lock in sbwait() to protect the socket buffer
wait state.  Convert tsleep() into msleep() with socket buffer mutex
as argument.

Modify sofree(), sosend(), and soreceive() to acquire SOCKBUF_LOCK()
in order to call into these functions with the lock, as well as to
start protecting other socket buffer use in their implementation.  Drop
the socket buffer mutexes around calls into the protocol layer, around
potentially blocking operations, for copying to/from user space, and
VM operations relating to zero-copy.  Assert the socket buffer mutex
strategically after code sections or at the beginning of loops.  In
some cases, modify return code to ensure locks are properly dropped.

Convert the potentially blocking allocation of storage for the remote
address in soreceive() into a non-blocking allocation; we may wish to
move the allocation earlier so that it can block prior to acquisition
of the socket buffer lock.

Drop some spl use.

NOTE: Some races exist in the current structuring of sosend() and
soreceive().  This commit only merges basic socket locking in this
code; follow-up commits will close additional races.  As merged,
these changes are not sufficient to run without Giant safely.

Reviewed by:	juli, tjr
2004-06-19 03:23:14 +00:00
njl
6f4685cc9a Add more precision to the cx_usage sysctl output and special-case 0%.
Submitted by:	YONETANI Tomokazu <qhwt+freebsd-acpi AT les.ath.cx>
2004-06-19 02:27:23 +00:00
rwatson
15ddd25f67 In tcp_ctloutput(), don't hold the inpcb lock over a call to
ip_ctloutput(), as it may need to perform blocking memory allocations.
This also improves consistency with locking relative to other points
that call into ip_ctloutput().

Bumped into by:	Grover Lines <grover@ceribus.net>
2004-06-18 20:22:21 +00:00
green
e57eac4be2 Add a sysctl/tunable, "kern.always_console_output", that lets you set
output to permanently (not ephemerally) go to the console.  It is also
sent to any other console specified by TIOCCONS as normal.

While I'm here, document the kern.log_console_output sysctl.
2004-06-18 20:12:42 +00:00
le
b7f1bee2cf Clean up allocated ressources when destroying the main vinum geom. 2004-06-18 19:53:33 +00:00
njl
3a20dac2f5 Remove compat code and unused lock declarations. 2004-06-18 17:58:11 +00:00
njl
cb82c4351b Remove compat defines. 2004-06-18 17:56:45 +00:00
bms
0cef2f91c1 Add stub for Linux SOUND_MIXER_READ_RECMASK, required by some Linux sound
applications.

PR:		misc/27471
Submitted by:	Gavin Atkinson (with cleanups)
2004-06-18 14:36:24 +00:00
kuriyama
bf763fabc7 Avoid deadlock which is caused by locking VDIR of parent and VREG of
snapshot itself in wrong order.
We can skip unlink check of that directory because it must have
snapshot in it.

Reviewed by:	mckusick and current@
2004-06-18 14:35:17 +00:00
bms
f2d71bff49 Add a stub for the Linux SOUND_MIXER_INFO ioctl (even though we don't
actually implement it), as some applications, such as RealProducer,
expect to be able to use it.

PR:		kern/65971
Submitted by:	Matt Wright
2004-06-18 14:25:44 +00:00
bms
c99430ca9d Linux applications expect to be able to call SIOCGIFCONF with an
NULL ifc.ifc_buf pointer, to determine the expected buffer size.

The submitted fix only takes account of interfaces with an AF_INET
address configured. This could no doubt be improved.

PR:		kern/45753
Submitted by:	Jacques Garrigue (with cleanups)
2004-06-18 14:06:46 +00:00
bms
d2de401fe0 Fix the VT_SETMODE/CDROMIOCTOCENTRY problem correctly.
Reviewed by:	tjr
2004-06-18 13:36:30 +00:00
bms
66acd3ba6e Check that m->m_pkthdr.rcvif is not NULL before checking if a packet
was received on a broadcast address on the input path. Under certain
circumstances this could result in a panic, notably for locally-generated
packets which do not have m_pkthdr.rcvif set.

This is a similar situation to that which is solved by
src/sys/netinet/ip_icmp.c rev 1.66.

PR:		kern/52935
2004-06-18 12:58:45 +00:00
davidxu
d11f8ce42b Add comment to reflect that we should retry after thread singling failed. 2004-06-18 11:13:49 +00:00
bms
18926c1c61 Appease GCC. 2004-06-18 09:53:58 +00:00
bms
97f3bd9e54 Fix two attempts to use an unchecked NULL pointer provided from the
userland, for the CDIOREADTOCENTRY and VT_SETMODE cases respectively.

Noticed by: tjr
2004-06-18 09:13:35 +00:00
phk
04325a6008 Remove nested include of <sys/module.h>
Should be happier now:	peter
2004-06-18 08:54:49 +00:00
phk
fd4160c6e9 Add missing <sys/module.h> include.
Approved by:	sam
2004-06-18 08:53:55 +00:00
phk
607546ee37 Reduce a fair bit of the atomics because we are now called with a
lock from kern_conf.c and cdev's act a lot more like real objects
these days.
2004-06-18 08:08:47 +00:00
simokawa
94bdc181d7 Fix the description of hw.firewire.sbp.exclusive_login.
Submitted by: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-06-18 08:02:49 +00:00
davidxu
70a732669b Remove a bogus panic. It is possible more than one threads will
be suspended in thread_suspend_check, after they are resumed, all
threads will call thread_single, but only one can be success,
others should retry and will exit in thread_suspend_check.
2004-06-18 06:21:09 +00:00
davidxu
673364f0ef If thread singler wants to terminate other threads, make sure it includes
all threads except itself.

Obtained from: julian
2004-06-18 06:15:21 +00:00
rwatson
081dc461f1 Correct merge-o: make sure to unlock symmetrically socket buffer
locks on bluetooth sockets when clearing upcall flags.

Submitted by:	emax
2004-06-18 05:09:42 +00:00
rwatson
89d347105a Hold SOCK_LOCK(so) while frobbing so_options. Note that while the
local race is corrected, there's still a global race in sosend()
relating to so_options and the SO_DONTROUTE flag.
2004-06-18 04:02:56 +00:00