]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoMFC: Destroy sx locks created with SX_SYSINIT() during module unload via a
jhb [Wed, 21 Sep 2005 21:05:19 +0000 (21:05 +0000)]
MFC: Destroy sx locks created with SX_SYSINIT() during module unload via a
SYSUNINIT.

Approved by: re (kensmith)

18 years agoMFC: Add witness checks to make sure exiting threads don't hold any locks.
jhb [Wed, 21 Sep 2005 21:04:16 +0000 (21:04 +0000)]
MFC: Add witness checks to make sure exiting threads don't hold any locks.

Approved by: re (kensmith)

18 years agoMFC: 1.16:
rodrigc [Wed, 21 Sep 2005 20:27:50 +0000 (20:27 +0000)]
MFC: 1.16:
  In mountd_precmd(), use rc_args, not mountd_args to
  override the value of mountd_args.  This fixes the problem
  where mountd_args was not properly being set if
  weak_mountd_authentifcation="YES" was set in rc.conf.

PR:             conf/86260
Submitted by:   Thierry Herbelot <thierry at herbelot dot com>
Approved by: re (kensmith)

18 years agoThis commit was manufactured by cvs2svn to create branch 'RELENG_6'.
cvs2svn [Wed, 21 Sep 2005 20:08:25 +0000 (20:08 +0000)]
This commit was manufactured by cvs2svn to create branch 'RELENG_6'.

18 years agoMerge uipc_socket.c:1.248 from HEAD to RELENG_6:
rwatson [Wed, 21 Sep 2005 15:32:21 +0000 (15:32 +0000)]
Merge uipc_socket.c:1.248 from HEAD to RELENG_6:

  Fix spelling in a comment.

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.126 from HEAD to RELENG_6:
rwatson [Wed, 21 Sep 2005 15:31:26 +0000 (15:31 +0000)]
Merge fifo_vnops.c:1.126 from HEAD to RELENG_6:

  Assert that (vp) is locked in fifo_close(), since we rely on the
  exclusive vnode lock to synchronize the reference counts on struct
  fifoinfo.

Approved by: re (scottl)

18 years agoMerge uipc_socket2.c:1.148 from HEAD to RELENG_6:
rwatson [Wed, 21 Sep 2005 15:30:54 +0000 (15:30 +0000)]
Merge uipc_socket2.c:1.148 from HEAD to RELENG_6:

  Re-comment sbcompress() to explain what it is it does; it took me
  quite a bit of reading to figure it out, and I want to avoid figuring
  it out again.

  Convert an if (foo) else printf("this is almost a panic") into a
  KASSERT.

Approved by: re (scottl)

18 years agoMFC rev. 1.29 to RELENG_6:
yongari [Wed, 21 Sep 2005 03:18:30 +0000 (03:18 +0000)]
MFC rev. 1.29 to RELENG_6:
 fix LOR by dropping driver lock before calling resource_int_value(9).

Approved by: re(scottl)

18 years agoMFC archive_read_extract.c 1.42 and 1.43: Correctly restore file flags.
kientzle [Wed, 21 Sep 2005 03:12:45 +0000 (03:12 +0000)]
MFC archive_read_extract.c 1.42 and 1.43:  Correctly restore file flags.

Approved by: re

18 years agoMFC rev. 1.21 to RELENG_6: fix module unloading panic
yongari [Wed, 21 Sep 2005 02:44:09 +0000 (02:44 +0000)]
MFC rev. 1.21 to RELENG_6: fix module unloading panic

Approved by: re(scottl)

18 years agoMerge fifo_vnops.c:1.125 from HEAD to RELENG_6:
rwatson [Tue, 20 Sep 2005 13:57:17 +0000 (13:57 +0000)]
Merge fifo_vnops.c:1.125 from HEAD to RELENG_6:

  The socket pointers in fifoinfo are not permitted to be NULL, so
  don't check if they are, it just confuses the fifo code more.

Approved by: re (kensmith)

18 years agoMFC typo fix from 1.75:
glebius [Tue, 20 Sep 2005 13:46:15 +0000 (13:46 +0000)]
MFC typo fix from 1.75:
  Dej'a vu of revision 1.35

  PR: kern/86258
  Submitted by: Hiroshi Oota <ghelp excite.co.jp>

Approved by: re (kensmith)

18 years agoMFC 1.84 by yar:
glebius [Tue, 20 Sep 2005 13:44:36 +0000 (13:44 +0000)]
MFC 1.84 by yar:
  Test the new M_VLANTAG packet flag before calling
  m_tag_locate().  This adds little overhead of a simple
  bitwise operation in case hardware VLAN acceleration
  is on, yet saves the more expensive function call if
  the acceleration is off.

  Reviewed by: ru, glebius

Approved by: re (kensmith)

18 years agoMFC 1.69:
glebius [Tue, 20 Sep 2005 13:42:20 +0000 (13:42 +0000)]
MFC 1.69:
  When message can't fit into socket receive buffer return ENOBUFS
  to userland program instead of letting it wait until end of days.

  PR: kern/85907

Approved by: re (kensmith)

18 years agoMerge locking of ng_pptpgre node. See 1.38, 1.39 log for longer
glebius [Tue, 20 Sep 2005 13:40:55 +0000 (13:40 +0000)]
Merge locking of ng_pptpgre node. See 1.38, 1.39 log for longer
description.

Approved by: re (kensmith)

18 years agoMerge savecore.c:1.76 from HEAD to RELENG_6:
rwatson [Tue, 20 Sep 2005 13:29:37 +0000 (13:29 +0000)]
Merge savecore.c:1.76 from HEAD to RELENG_6:

  Don't consider being unable to open the bounds file worthy of printing
  at LOG_WARNING by default; instead, consider it something to be printed
  to the tty when 'verbose' mode is set.  This avoids printing out extra
  lines at every boot on a system with crash dumps enabled, but that has
  not yet had to generate a crashdump.

Approved by: re (kensmith)

18 years agoMerge dumpon:1.10 from HEAD to RELENG_6:
rwatson [Tue, 20 Sep 2005 13:28:01 +0000 (13:28 +0000)]
Merge dumpon:1.10 from HEAD to RELENG_6:

  Use kenv -q to extract dumpdev rather than kenv, in order to avoid
  spamming the console in the event that a loader tunable 'dumpdev'
  isn't defined, which is not a relevant failure to report.

Approved by: re (kensmith)

18 years agoMerge kenv.1:1.12, kenv.c:1.8 from HEAD to RELENG_6:
rwatson [Tue, 20 Sep 2005 13:26:21 +0000 (13:26 +0000)]
Merge kenv.1:1.12, kenv.c:1.8 from HEAD to RELENG_6:

  Add a "-q" quiet flag to kenv so that warnings can be suppressed.

Approved by: re (kensmith)

18 years agoSuppress warning, to avoid fake bug reports from users of 6.0-RELEASE.
glebius [Tue, 20 Sep 2005 09:16:10 +0000 (09:16 +0000)]
Suppress warning, to avoid fake bug reports from users of 6.0-RELEASE.

Push warning in net_add_domain() down under DIAGNOSTIC. At the moment, the
only loadable domain is netgraph and it has no problems to be loaded
at runtime, since it doesn't use if_afdata[AF_NETGRAPH], yet.

Approved by: re (scottl)

18 years agoMFC 1.64 by kientzle:
delphij [Tue, 20 Sep 2005 07:48:00 +0000 (07:48 +0000)]
MFC 1.64 by kientzle:

The bsdtar_warnc() reporting function requires the program name to be
set up before it is called, so move the progname initialization before
the first possible call to bsdtar_warnc().

Thanks to: Stanislav Sedov
PR: bin/83366

Approved by: re (scottl)

18 years agoMFC: rev. 1.886 by joel
brueffer [Tue, 20 Sep 2005 04:53:12 +0000 (04:53 +0000)]
MFC: rev. 1.886 by joel

New release notes: snd_t4dwave(4) manual page added.

Approved by: re (hrs)

18 years agoMFC:
brueffer [Tue, 20 Sep 2005 04:51:32 +0000 (04:51 +0000)]
MFC:

Auto generate device listings for snd_t4dwave(4).

Approved by: re (hrs)

18 years agoMFC: rev. 1.40 by joel
brueffer [Tue, 20 Sep 2005 04:49:59 +0000 (04:49 +0000)]
MFC: rev. 1.40 by joel

Xref snd_t4dwave(4).

Approved by: re (hrs)

18 years agoMFC:
brueffer [Tue, 20 Sep 2005 04:48:30 +0000 (04:48 +0000)]
MFC:

Add manual page for snd_t4dwave(4).

Approved by: re (hrs)

18 years agoMFC v1.129 src/sys/net/rtsock.c
csjp [Tue, 20 Sep 2005 01:59:54 +0000 (01:59 +0000)]
MFC v1.129 src/sys/net/rtsock.c

Make sysctl_rtsock MP safe.

Approved by: re (scottl)

18 years agoMFC: 1.61
rodrigc [Tue, 20 Sep 2005 00:34:54 +0000 (00:34 +0000)]
MFC: 1.61
  Clarify wording for -m flag.

PR:     docs/84704
Approved by: re (hrs)

18 years agoMFC:
marcus [Mon, 19 Sep 2005 21:50:31 +0000 (21:50 +0000)]
MFC:

Correct a mis-merge from HEAD, and make sure the socket permissions are set
to 0666.

Reported by: delphij via rwatson
Approved by: re (scottl)

18 years agoMFC revision 1.5:
cperciva [Mon, 19 Sep 2005 20:56:10 +0000 (20:56 +0000)]
MFC revision 1.5:
  When (re)allocating space for an array of pointers to char, use
  sizeof(*list), not sizeof(**list).  (i.e., sizeof(pointer) rather than
  sizeof(char)).

Approved by: re (scottl)

18 years agoMFC:
brueffer [Mon, 19 Sep 2005 16:53:59 +0000 (16:53 +0000)]
MFC:

- ed(4) MPSAFE
- acpi_ibm.4 and acpi_sony.4 manpages added

While here, correct two entities.

Approved by: re (hrs)

18 years agoMFC:
brueffer [Mon, 19 Sep 2005 16:51:10 +0000 (16:51 +0000)]
MFC:

Manpage for the acpi_sony(4) driver.

Approved by: re (hrs)

18 years agoMFC:
phk [Sun, 18 Sep 2005 17:13:17 +0000 (17:13 +0000)]
MFC:
This bit missed out in the DEVFS MFC earlier today:
SYSCTL debug.sizeof.cdev moved to relevant source file.

Approved by: re@ (scottl)

18 years agoMFC rev 1.94:
scottl [Sun, 18 Sep 2005 15:03:31 +0000 (15:03 +0000)]
MFC rev 1.94:
  Fix race condition that caused activation of an event to
  be ignored immediately after it was deactivated.

Submitted by: Stephan Uphoff, Yahoo
Approved by: re

18 years agoMFC:
phk [Sun, 18 Sep 2005 07:10:57 +0000 (07:10 +0000)]
MFC:
Various fixes for DEVFS, in particular "devfs ruleset already running".

Approved by: re@ (scottl)

18 years agoSwitch over to 6.0-BETA5.
scottl [Sun, 18 Sep 2005 05:12:39 +0000 (05:12 +0000)]
Switch over to 6.0-BETA5.

Approved by: re

18 years agoTake a step closer to the release and turn off malloc debugging.
scottl [Sun, 18 Sep 2005 03:45:24 +0000 (03:45 +0000)]
Take a step closer to the release and turn off malloc debugging.

Approved by: re (implicit)

18 years agoNow that our showstopper list has shrunk, take another step closer to the
scottl [Sun, 18 Sep 2005 03:37:59 +0000 (03:37 +0000)]
Now that our showstopper list has shrunk, take another step closer to the
release and turn off kernel debugging.  Also turn off SMP on i386 and amd64
and add an SMP kernel config.

Approved by: re (implicit)

18 years agoMFC v1.163 src/sys/kern/imgact_elf.c
csjp [Sun, 18 Sep 2005 03:31:35 +0000 (03:31 +0000)]
MFC v1.163 src/sys/kern/imgact_elf.c
MFC v1.82  src/sys/kern/vfs_lookup.c
MFC v1.394 src/sys/kern/vfs_syscalls.c

Approved by: re (scottl)

18 years agoMFC: Merge resource fixes for pci devices on pci0 for ioport.
imp [Sun, 18 Sep 2005 02:55:10 +0000 (02:55 +0000)]
MFC: Merge resource fixes for pci devices on pci0 for ioport.

Approved by: re (scottl)

18 years agoMFC 1.156 (mjacob). Original log:
mjacob [Sun, 18 Sep 2005 02:29:27 +0000 (02:29 +0000)]
MFC 1.156 (mjacob). Original log:

>Make the exploring of all luns supported by an HBA more of a
>tunable (until we get REPORT LUNS in place).
>
>If we're probing luns, and each probe succeeds, we keep going past
>lun 7 if we're a SCSI3 or better device (until we fail to probe).
>
>If we're probing luns, and a probe fails, we only keep going if
>we're quirked *for* it (CAM_QUIRK_HILUNS), and if we're not quirked
>*against* it (CAM_QUIRK_NOHILUNS), or we're a SCSI3 or better device
>and the tunable (kern.cam.cam_srch_hi) is set non-zero.

Approved by: re (scottl)

18 years agoMFC 1.21
garys [Sat, 17 Sep 2005 17:12:18 +0000 (17:12 +0000)]
MFC 1.21

Approved by: re

18 years agoOops, actually MFC 1.89 (by kan) which was missed in previous commit:
delphij [Sat, 17 Sep 2005 15:51:41 +0000 (15:51 +0000)]
Oops, actually MFC 1.89 (by kan) which was missed in previous commit:

Handle a race condition where NULLFS vnode can be cleaned while threads
can still be asleep waiting for lowervp lock.

Tested by: kkenn
Discussed with: ssouhlal, jeffr

(this is an early MFC for inclusion in the upcoming 6.0-BETA5)

Approved by: re (scottl)

18 years agoMFC: Break out of loop if next buffer pointer has become invalid while
tegge [Sat, 17 Sep 2005 15:51:12 +0000 (15:51 +0000)]
MFC: Break out of loop if next buffer pointer has become invalid while
     flushing current buffer.

Approved by: re (scottl)

18 years agoMFC 1.88 (by ssouhlal):
delphij [Sat, 17 Sep 2005 15:48:05 +0000 (15:48 +0000)]
MFC 1.88 (by ssouhlal):

Use vput() instead of vrele() in null_reclaim() since the lower vnode
is locked.

MFC 1.89 (by kan):

Handle a race condition where NULLFS vnode can be cleaned while threads
can still be asleep waiting for lowervp lock.

Tested by: kkenn
Discussed with: ssouhlal, jeffr

(rev. 1.89 is an early MFC for inclusion in the upcoming 6.0-BETA5)

Approved by: re (scottl)

18 years agoMFC revision 1.3:
cperciva [Sat, 17 Sep 2005 15:43:40 +0000 (15:43 +0000)]
MFC revision 1.3:
  Log:
  Handle circular dependencies properly (via errx(3)) rather than dumping
  core.  This bug was made visible by a recent change to the audio/timidity++
  port, which now has itself as a run dependency.

Approved by: re (scottl)

18 years agoMFC 1.25
garys [Sat, 17 Sep 2005 15:27:27 +0000 (15:27 +0000)]
MFC 1.25

Approved by: re

18 years agoMFC: if_pfsync.c, 1.23:
mlaier [Sat, 17 Sep 2005 15:19:38 +0000 (15:19 +0000)]
MFC: if_pfsync.c, 1.23:
  Stop leaking a lock.  This used to cause a propagate_priority() page fault
  when setting syncdev and syncpeer.

  Reported by:    Dominic Marks

Approved by: re (scottl)

18 years agoMFC: rev. 1.111
bz [Sat, 17 Sep 2005 13:43:36 +0000 (13:43 +0000)]
MFC: rev. 1.111
Fix panic when kernel compiled without INET6 by rejecting
IPv6 opcodes which are behind #if(n)def INET6 now.

PR: kern/85826
Approved by: re (scottl)

18 years agoMFC { r1.4, r1.5 "pmcstat_log.c" }
jkoshy [Sat, 17 Sep 2005 13:04:10 +0000 (13:04 +0000)]
MFC { r1.4, r1.5 "pmcstat_log.c" }
 - Determine where the runtime loader got mapped to when a dynamically
   linked process was exec()'ed, and map samples in that address range
   into the appropriate buckets in the runtime loader's profile.

 - Fix a bug that caused generated gmon.out profiles to be out of
   whack.  Use saturating arithmetic when incrementing a bucket.

 - Improve a few comments.

Approved by: re (scottl)

18 years agoMFC: Add a -h option to tell cmp not to follow symbolic links.
brian [Sat, 17 Sep 2005 11:33:41 +0000 (11:33 +0000)]
MFC: Add a -h option to tell cmp not to follow symbolic links.

Approved by: re (scottl)
Sponsored by: Sophos/ActiveState

18 years agoMFC: pccard updates
imp [Sat, 17 Sep 2005 04:01:05 +0000 (04:01 +0000)]
MFC: pccard updates
o New APIs to access CIS, attribute memory and pccard registers
o Lock ed driver
o Support more cards in ed, ep, sn, xe
o Use new APIs to get MAC address right more often.

Approved by: re (scottl)

18 years agoThis commit was manufactured by cvs2svn to create branch 'RELENG_6'.
cvs2svn [Sat, 17 Sep 2005 03:36:48 +0000 (03:36 +0000)]
This commit was manufactured by cvs2svn to create branch 'RELENG_6'.

18 years agoMFC: rev 1.66
ps [Fri, 16 Sep 2005 18:04:10 +0000 (18:04 +0000)]
MFC: rev 1.66
Don't allow ioctl commands to be interrupted by the user.

Approved by: re (scottl)

18 years agoMFC: rev 1.67
ps [Fri, 16 Sep 2005 18:02:38 +0000 (18:02 +0000)]
MFC: rev 1.67
Print the actual disk device we failed to complete i/o on.

Approved by: re (scottl)

18 years agoMFC:
ps [Fri, 16 Sep 2005 18:01:55 +0000 (18:01 +0000)]
MFC:
Ignore mutex asserts when we're dumping as well.  This allows me
to panic a system from DDB when INVARIANTS is compiled into the
kernel on a scsi system.

Approved by: re (scottl)

18 years agoMFC:
ps [Fri, 16 Sep 2005 18:00:59 +0000 (18:00 +0000)]
MFC:
Add support for HP branded 2610SA

Approved by: re (scottl)

18 years agoMFC:
ps [Fri, 16 Sep 2005 17:59:48 +0000 (17:59 +0000)]
MFC:
There's no reason to check the valence.  This allows ciss to work
on the P600.

Approved by: re (scottl)

18 years agoMFC: rev 1.283
ps [Fri, 16 Sep 2005 17:58:54 +0000 (17:58 +0000)]
MFC: rev 1.283
Remove a KASSERT in the sack path that fails because of a interaction
between sack and a bug in the "bad retransmit recovery" logic. This is
a workaround, the underlying bug will be fixed later.

Approved by: re (scottl)

18 years agoMFC: rev 1.20
ps [Fri, 16 Sep 2005 17:58:06 +0000 (17:58 +0000)]
MFC: rev 1.20
For FreeBSD 4 binaries, when trying to read from a device that does
not exsist, do not have ioctl return an error, but instead set -1
in the data returned to the user.  This allows the HP bios flash
utilities to work without requiring changes to their code.

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.124 from HEAD to RELENG_6:
rwatson [Fri, 16 Sep 2005 14:03:57 +0000 (14:03 +0000)]
Merge fifo_vnops.c:1.124 from HEAD to RELENG_6:

  Trim down now (believed to be) unused fifo_ioctl() and
  fifo_kqfilter() VOP implementations, since they in theory are used
  only on open file descriptors, in which case the ioctls are via
  fifo_ioctl_f() and kqueue requests are via fifo_kqfilter_f().
  Generate warnings if they are entered for now.  These printf()
  calls should become panic() calls.

  Annotate and re-implement fifo_ioctl_f(): don't arbitrarily
  forward ioctls to the socket layer, only forward the ones we
  explicitly support for fifos.  In the case of FIONREAD, don't
  forward the request to the write socket on a read-write fifo, or
  the read result is overwritten.  Annotate a nasty case for the
  undefined POSIX O_RDWR on fifos, in which failure of the second
  ioctl will result in the socket pair being in an inconsistent
  state.

  Assert copyright as I find myself rewriting non-trivial parts of
  fifofs.

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.122 from HEAD to RELENG_6:
rwatson [Fri, 16 Sep 2005 14:03:10 +0000 (14:03 +0000)]
Merge fifo_vnops.c:1.122 from HEAD to RELENG_6:

  Annotate two issues:

  1) fifo_kqfilter() is not actually ever used, it likely should be GC'd.

  2) fifo_kqfilter_f() doesn't implement EVFILT_VNODE, so detecting events
     on the underlying vnode for a fifo no longer works (it did in 4.x).
     Likely, fifo_kqfilter_f() should forward the request to the VFS using
     fp->f_vnode, which would work once fifo_kqfilter() was detached from
     the vnode operation vector (removing the fifo override).

  Discussed with: phk

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.123 from HEAD to RELENG_6:
rwatson [Fri, 16 Sep 2005 13:36:44 +0000 (13:36 +0000)]
Merge fifo_vnops.c:1.123 from HEAD to RELENG_6:

  As a result of kqueue locking work, socket buffer locks will always
  be held when entering a kqueue filter for fifos via a socket buffer
  event: as such, assert the lock unconditionally rather than acquiring
  it conditionally.

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.121 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:53:56 +0000 (20:53 +0000)]
Merge fifo_vnops.c:1.121 from HEAD to RELENG_6:

  Introduce no-op nosup fifo kqueue filter and detach routine, which are
  used when a read filter is requested on a write-only fifo descriptor, or
  a write filter is requested on a read-only fifo descriptor.  This
  permits the filters to be registered, but never raises the event, which
  causes kqueue behavior for fifos to more closely match similar semantics
  for poll and select, which permit testing for the condition even though
  the condition will never be raised, and is consistent with POSIX's notion
  that a fifo has identical semantics to a one-way IPC channel created
  using pipe() on most operating systems.

  The fifo regression test suite can now run to completion on HEAD without
  errors.

Approved by: re (kensmith)

18 years agoMerge if.c:1.246 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:53:22 +0000 (20:53 +0000)]
Merge if.c:1.246 from HEAD to RELENG_6:

  In netkqfilter(), return EINVAL instead of 1 (EPERM) when a filter type
  is requested on a network interface file descriptor that is
  non-applicable.

Approved by: re (kensmith)

18 years agoMerge vfs_subr.c:1.646 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:52:53 +0000 (20:52 +0000)]
Merge vfs_subr.c:1.646 from HEAD to RELENG_6:

  In vfs_kqfilter(), return EINVAL instead of 1 (EPERM) when an unsupported
  kqueue filter type is requested on a vnode.

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.120 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:50:31 +0000 (20:50 +0000)]
Merge fifo_vnops.c:1.120 from HEAD to RELENG_6:

  When a request is made to register a filter on a fifo that doesn't
  apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject
  it as EINVAL, not by returning 1 (EPERM).

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.119 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:50:04 +0000 (20:50 +0000)]
Merge fifo_vnops.c:1.119 from HEAD to RELENG_6:

  Remove DFLAG_SEEKABLE from fifo file descriptors: fifos are not seekable
  according to POSIX, not to mention the fact that it doesn't make sense
  (and hence isn't really implemented).  This causes the fifo_misc
  regression test to succeed.

Approved by: re (scottl)

18 years agoMerge fifo_vnops.c:1.118 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:28:56 +0000 (20:28 +0000)]
Merge fifo_vnops.c:1.118 from HEAD to RELENG_6:

  Only poll the fifo for read events if the fifo is attached to a readable
  file descriptor.  Otherwise, the read end of a fifo might return that it
  is writable (which it isn't).

  Only poll the fifo for write events if the fifo attached to a writable
  file descriptor.  Otherwise, the write end of a fifo might return that
  it is readable (which it isn't).

  In the event that a file is FREAD|FWRITE (which is allowed by POSIX, but
  has undefined behavior), we poll for both.

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.117 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:28:27 +0000 (20:28 +0000)]
Merge fifo_vnops.c:1.117 from HEAD to RELENG_6:

  After going to some trouble to identify only the write-related events
  to poll the write socket for, the fifo polling code proceeded to poll
  for the complete set of events.  Use 'levents' instead of 'events' as
  the argument to poll, and only poll the write socket if there is
  interest in write events.

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.116 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:27:56 +0000 (20:27 +0000)]
Merge fifo_vnops.c:1.116 from HEAD to RELENG_6:

  When a writer opens a fifo, wake up the read socket for read, not the
  write socket.

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.115 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:27:25 +0000 (20:27 +0000)]
Merge fifo_vnops.c:1.115 from HEAD to RELENG_6:

  Add an assertion that fifo_open() doesn't race against other threads
  while sleeping to allocate fifo state: due to using the vnode lock to
  serialize access to a fifo during open, it shouldn't happen (tm).

Approved by: re (kensmith)

18 years agoMerge fifo_vnops.c:1.114 from HEAD to RELENG_6:
rwatson [Thu, 15 Sep 2005 20:26:19 +0000 (20:26 +0000)]
Merge fifo_vnops.c:1.114 from HEAD to RELENG_6:

  Rather than reaching into the internals of the UNIX domain socket code
  by calling uipc_connect2() to connect two socket endpoints to create a
  fifo, call soconnect2().

Approved by:    re (kensmith)

18 years agoMFC: Fixup locking and mark MPSAFE.
jhb [Thu, 15 Sep 2005 19:16:29 +0000 (19:16 +0000)]
MFC: Fixup locking and mark MPSAFE.

Approved by: re (kensmith)

18 years agoMFC r1.12:
jkoshy [Thu, 15 Sep 2005 15:48:16 +0000 (15:48 +0000)]
MFC r1.12:
  ``Process one NMI interrupt per handler invocation as the processor
  buffers pending NMIs from multiple interrupting PMCs and delivers
  them serially.''

Approved by: re (kensmith)

18 years agoMFC: sys/geom/eli/g_eli.c 1.12,1.13
pjd [Thu, 15 Sep 2005 14:17:31 +0000 (14:17 +0000)]
MFC: sys/geom/eli/g_eli.c 1.12,1.13

- Don't forget to initialize crp_etype field.

  Reported by: Nick Evans <nevans@syphen.net>

- Fix copy&paste typo.

Approved by: re (scottl)

18 years agoMFC: sbin/geom/class/eli/geom_eli.c 1.4
pjd [Thu, 15 Sep 2005 14:12:54 +0000 (14:12 +0000)]
MFC: sbin/geom/class/eli/geom_eli.c 1.4

Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

Found by: regression tests
Approved by: re (scottl)

18 years agoMFC: sys/dev/bge/if_bge.c 1.94
pjd [Thu, 15 Sep 2005 14:10:41 +0000 (14:10 +0000)]
MFC: sys/dev/bge/if_bge.c 1.94

When bge_stop() is called from bge_detach(), mii is already NULL, so check
before trying to use it.
This fix allows to 'kldunload if_bge' without panicing.

Reviewed by: bz
Approved by: re (scottl)

18 years agoMega-MFC:
marcel [Thu, 15 Sep 2005 05:32:11 +0000 (05:32 +0000)]
Mega-MFC:
o  Manpage type fix:
kgdb/kgdb.1: 1.8

o  Unwind across trapframes:
kgdb/kgdb.h: 1.3
kgdb/kthr.c: 1.3
kgdb/main.c: 1.9
kgdb/trgt.c: 1.4
kgdb/trgt_alpha.c: 1.3, 1.4
kgdb/trgt_amd64.c: 1.3, 1.4, 1.5
kgdb/trgt_i386.c: 1.3, 1.4, 1.5
kgdb/trgt_ia64.c: 1.3, 1.4
kgdb/trgt_sparc64.c: 1.4, 1.5, 1.6
libgdb/Makefile: 1.10
libgdb/frame-unwind.diff: 1.1

Approved by: re (scottl)

18 years agoMFC: 1.26
marius [Wed, 14 Sep 2005 21:26:09 +0000 (21:26 +0000)]
MFC: 1.26

Add gem(4) to the list of devices supporting VLAN-sized frames natively
(since sys/dev/gem/if_gem.c rev. 1.34, MFC'ed in rev. 1.29.2.4).

Approved by: re (scottl)

18 years agoMFC: 1.34
marius [Wed, 14 Sep 2005 21:23:50 +0000 (21:23 +0000)]
MFC: 1.34

- Allow for VLAN-sized frames and set IFCAP_VLAN_MTU.
- On resume all registers have to be initialized again like after
  power-on so reset sc_inited in gem_suspend() in order get all of
  the registers set next time gem_init_regs() is called.
- On at least some ERI and GEM revisions GEM_MAC_RX_OVERFLOW happen
  often due to a silicon bug and re-initializing is all we can do
  about these errors so make handling them non-verbose.
- Remove a superfluous memset(3) call in gem_meminit(), all elements
  are initialized to 0 anyway.

Approved by: re (scottl)

18 years agoMFC: 1.10
marius [Wed, 14 Sep 2005 21:21:45 +0000 (21:21 +0000)]
MFC: 1.10

As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

Approved by: re (scottl)

19 years agoMFC 1.118:
delphij [Wed, 14 Sep 2005 02:45:50 +0000 (02:45 +0000)]
MFC 1.118:

When padding with zero, do pad after prefixes rather than padding
before prefixes.

Use cases:
printf("%05d", -42);   -->   "00-42"   (should be "-0042")
printf("%#05x", 12);   -->   "000xc"   (should be "0x00c")

Submitted by: Oliver Fromme
PR: kern/85520
Approved by: re (kensmith)

19 years agoMega-MFC: Add SMP support and enable it by default. This includes:
marcel [Tue, 13 Sep 2005 21:07:14 +0000 (21:07 +0000)]
Mega-MFC: Add SMP support and enable it by default. This includes:
conf/GENERIC: 1.73, 1.53
ia64/exception.S: 1.57
ia64/interrupt.c: 1.50, 1.51
ia64/machdep.c: 1.201, 1.202
ia64/mp_machdep.c: 1.56, 1.57, 1.58
ia64/pmap.c: 1.161, 1.162, 1.164, 1.165, 1.166
ia64/sal.c: 1.15
ia64/trap.c: 1.114, 1.115
ia64/vm_machdep.c: 1.91, 1.92
include/ia64_cpu.h: 1.20
include/param.h: 1.21
include/pmap.h: 1.25
include/proc.h: 1.15
include/smp.h: 1.10

Approved by: re (kensmith, scottl -- thanks!)

19 years agoMFC 1.20: Remove the execute permission for stacks.
marcel [Tue, 13 Sep 2005 20:54:00 +0000 (20:54 +0000)]
MFC 1.20: Remove the execute permission for stacks.

Approved by: re (blanket)

19 years agoMFC: if_bridge.c, r1.21; if_ethersubr.c, r1.198; in6_ifattach.c, r1.28;
thompsa [Tue, 13 Sep 2005 18:02:39 +0000 (18:02 +0000)]
MFC: if_bridge.c, r1.21; if_ethersubr.c, r1.198; in6_ifattach.c, r1.28;
     nd6.c, r1.55; nd6_nbr.c, r1.33

> Add support for multicast to the bridge and allow inet6 addresses to be
> assigned to the interface.
>
> IPv6 auto-configuration is disabled. An IPv6 link-local address has a
> link-local scope within one link, the spec is unclear for the bridge case and
> it may cause scope violation.
>
> An address can be assigned in the usual way;
>   ifconfig bridge0 inet6 xxxx:...
>
> Tested by:      bmah
> Reviewed by:    ume (netinet6)
> Approved by:    mlaier (mentor)

Approved by: re (kensmith), mlaier (mentor)

19 years agoMFC r1.9: Improve an error message.
jkoshy [Tue, 13 Sep 2005 15:23:26 +0000 (15:23 +0000)]
MFC r1.9: Improve an error message.

Approved by: re (kensmith)

19 years agoMFC 1.141:
glebius [Tue, 13 Sep 2005 14:37:58 +0000 (14:37 +0000)]
MFC 1.141:
  - Do not hold route entry lock, when calling arprequest(). One such
    call was introduced by me in 1.139, the other one was present before.
  - Do all manipulations with rtentry and la before dropping the lock.
  - Copy interface address from route into local variable before dropping
    the lock. Supply this copy as argument to arprequest().

  (LOR Ids in original commit message.)

Approved by: re (scottl)

19 years agoMFC rev. 1.10: postpone a temporary file creation until we realize
maxim [Tue, 13 Sep 2005 14:34:11 +0000 (14:34 +0000)]
MFC rev. 1.10: postpone a temporary file creation until we realize
if ipfw(4) ever used.

Approved by: re (scottl)

19 years agoMFC rev. 1.233: Fix ICMP_UNREACH_NEEDFRAG case where no MTU was proposed
andre [Tue, 13 Sep 2005 13:56:22 +0000 (13:56 +0000)]
MFC rev. 1.233: Fix ICMP_UNREACH_NEEDFRAG case where no MTU was proposed
in the ICMP reply.

PR:             kern/81813
Submitted by:   Vitezslav Novy <vita at fio.cz>
Approved by: re (kensmith)

19 years agoMFC 1.7:
glebius [Tue, 13 Sep 2005 12:44:19 +0000 (12:44 +0000)]
MFC 1.7:
  Plug item leak in case when not all hooks are connected.

  Found by: David Vos <david.vos gmail.com>

Approved by: re (kensmith)

19 years agoMFC 1.68 by obrien:
glebius [Tue, 13 Sep 2005 12:43:15 +0000 (12:43 +0000)]
MFC 1.68 by obrien:
  Fix missing '=' in structure initialization.

Approved by: re (kensmith)

19 years agoMFC 1.26 by ru:
glebius [Tue, 13 Sep 2005 12:41:05 +0000 (12:41 +0000)]
MFC 1.26 by ru:
  Fixed parsing of unsigned integers.

Approved by: re (kensmith)

19 years agoMFC 1.3
grehan [Tue, 13 Sep 2005 05:59:07 +0000 (05:59 +0000)]
MFC 1.3

   Comment out ofw_console 'screen' entry and zs tty entries.
   The OpenFirmware console isn't used on real systems anymore and
   I never get to multi-user mode in psim. There are problems with
   zs that need to be resolved before these lines can be enabled.

   This eliminates disconcerting warnings on boot.

Approved by: re (Ken Smith)

19 years agoMFC r1.101
grehan [Tue, 13 Sep 2005 05:11:37 +0000 (05:11 +0000)]
MFC r1.101

  Fix boot-time hang/panic on G3 systems when modifying IBAT0 in
  pmap_bootstrap by using the sync;isync big hammer to make sure
  all prior operations have completed.

  Reported by:    Nathan Whitehorn <nathan at uchicago edu>

Approved by: re (Ken Smith)

19 years agoMFC to RELENG_6
emax [Mon, 12 Sep 2005 16:09:23 +0000 (16:09 +0000)]
MFC to RELENG_6

Fix typo in usage

Submitted by: Jonatan B <onatan at gmail dot com>
Approved by: re (scottl)

19 years agoMFC: Giant is no longer needed here.
tegge [Mon, 12 Sep 2005 15:56:07 +0000 (15:56 +0000)]
MFC: Giant is no longer needed here.

Approved by: re (scottl)

19 years agoMFC: Don't retry when vget() returns ENOENT in the nonblocking case due to
tegge [Mon, 12 Sep 2005 15:53:58 +0000 (15:53 +0000)]
MFC: Don't retry when vget() returns ENOENT in the nonblocking case due to
     the vnode being doomed.  It causes a livelock.

Approved by: re (scottl)

19 years agoMFC 1.112:
glebius [Mon, 12 Sep 2005 14:46:19 +0000 (14:46 +0000)]
MFC 1.112:
  Fix an item leak, that happens when some node calls ng_callout() two
  times consequently, without checking whether callout has been serviced
  or not. (ng_pptpgre and ng_ppp were catched in this behavior).

    - In ng_callout() save old item before calling callout_reset(). If the
      latter has returned 1, then free this item.
    - In ng_uncallout() clear c->c_arg.

  Problem reported by:    Alexandre Kardanev

Approved by: re (kensmith)

19 years agoMFC:
glebius [Mon, 12 Sep 2005 13:43:34 +0000 (13:43 +0000)]
MFC:
  Make callout_reset() return a non-zero value if a pending callout
  was rescheduled. If there was no pending callout, then return 0.

  Reviewed by:    iedowse, cperciva

Approved by: re (kensmith)

19 years agoMFC 1.33:
glebius [Mon, 12 Sep 2005 13:39:47 +0000 (13:39 +0000)]
MFC 1.33:
  Change default KTR_COMPILE from KTR_GEN to KTR_ALL, to match with
  manual page.

  Reviewed by:    jhb, pjd

Approved by: re (kensmith)

19 years agoMFC 1.31:
glebius [Mon, 12 Sep 2005 13:37:56 +0000 (13:37 +0000)]
MFC 1.31:
  When a carp(4) interface is being destroyed and is in a promiscous mode,
  first interface is detached from parent and then bpfdetach() is called.
  If the interface was the last carp(4) interface attached to parent, then
  the mutex on parent is destroyed. When bpfdetach() calls if_setflags()
  we panic on destroyed mutex.

  To prevent the above scenario, clear pointer to parent, when we detach
  ourselves from parent.

Approved by: re (kensmith)