117703 Commits

Author SHA1 Message Date
des
b0f5f61587 MFC: don't take unprotected keys into account for authentication.
PR:		bin/81231
Approved by:	re (kensmith)
2005-09-30 14:02:29 +00:00
nyan
9fa3c16a94 MFC: Call gctl_free() to free resource allocated with gctl_get_handle().
Approved by:	re (kensmith)
2005-09-30 13:09:01 +00:00
delphij
15d6d1b68d MFC sys/fs/hpfs/hpfs_vfsops.c:1.54-1.56,
sys/fs/msdosfs/msdosfs_vfsops.c:1.145,
    sys/fs/ntfs/ntfs_vfsops.c:1.79-1.80,
    sys/fs/udf/udf_vfsops.c:1.34-1.35,
    sys/gnu/fs/ext2fs/ext2_vfsops.c:1.152-1.153,
    sys/gnu/fs/reiserfs/reiserfs_vfsops.c:1.2-1.3 (by ssouhlal):

*_mountfs() (if the filesystem mounts from a device) needs devvp to be
locked, so lock it.

Approved by:	re (scottl)
2005-09-30 06:26:42 +00:00
delphij
8eaf585962 MFC 1.293 (by ssouhlal):
ffs_mountfs() needs devvp to be locked, so lock it.

Approved by:	re (scottl)
2005-09-30 06:14:44 +00:00
delphij
4bdf4b1161 MFC 1.197 (by ssouhlal):
Don't unbusy the devfs mount in vfs_mountroot_try() as it gets accessed
and unbusied in devfs_fixup(), which assumes that the devfs mount is
still locked.

Approved by:	re (scottl)
2005-09-30 06:10:59 +00:00
csjp
7c428d998f MFC src/contrib/pf/pflogd/pflogd.c rev 1.9
Implement BIOCLOCK

Approved by:	re (kensmith)
2005-09-29 23:50:29 +00:00
csjp
a49552acda MFC privilege separation enhancements for bpf(4)
Introduce BIOCLOCK and BIOCSETWF

Revision(s)
    1.158     +81 -23    src/sys/net/bpf.c
    1.40      +2 -0      src/sys/net/bpf.h
    1.31      +4 -1      src/sys/net/bpfdesc.h

Approved by:	re (scottl)
2005-09-29 23:48:04 +00:00
rwatson
a15c06842e Merge if.c:1.247, in.c:1.88, in.h:1.92 from HEAD to RELENG_6:
Take a first cut at cleaning up ifnet removal and multicast socket
  panics, which occur when stale ifnet pointers are left in struct
  moptions hung off of inpcbs:

  - Add in_ifdetach(), which matches in6_ifdetach(), and allows the
    protocol to perform early tear-down on the interface early in
    if_detach().

  - Annotate that if_detach() needs careful consideration.

  - Remove calls to in_pcbpurgeif0() in the handling of SIOCDIFADDR --
    this is not the place to detect interface removal!  This also
    removes what is basically a nasty (and now unnecessary) hack.

  - Invoke in_pcbpurgeif0() from in_ifdetach(), in both raw and UDP
    IPv4 sockets.

  It is now possible to run the msocket_ifnet_remove regression test
  using HEAD without panicking.

  Reported by:	Gavin Atkinson <gavin dot atkinson at ury dot york dot ac dot uk>

Approved by:	re (scottl)
2005-09-29 20:57:07 +00:00
jhb
3f3d85126f MFC: Use correct VFS locking in kern_alternate_path().
Approved by:	re (scottl)
2005-09-29 18:53:10 +00:00
jhb
81459002f4 MFC various fixes to sis(4):
- Remove sis_unit and use device_printf() and if_printf() instead.
- Use callout_init_mtx() for the callout.
- Remove spls.
- Fix locking for ifmedia to happen in the ifmedia handlers rather than in
  sis_ioctl().

Approved by:	re (scottl)
2005-09-29 18:52:21 +00:00
jhb
9016005ea3 MFC: Add the spin lock used by the binary nvidia-driver to the static lock
order list.

Approved by:	re (scottl)
2005-09-29 18:47:31 +00:00
rwatson
5db6e492ee Merge subr_prof.c:1.119, 1.120, 1.121, nfs_socket.c:1.130,
rpcclnt.c:1.14 from HEAD to RELENG_6:

Acquire Giant in uprintf() and tprintf() due to the non-MPSAFEty of
the tty code invoked from these functions.  In two cases, during
timeout handling in NFS-related RPC client code, acquire Giant in
the caller before other mutexes the caller might hold, in order to
avoid lock order reversals with Giant (a recursive acquire is not
a reversal as it won't ever wait).

Correct age-old comments about uprintf()/tprintf() sleeping: they
will never sleep.

Much useful feedback from:	bde
Approved by:			re (scottl)
2005-09-29 18:40:36 +00:00
glebius
ebe24453ed MFC 1.62:
- Print space character in show_stat(). Remove a lot of priuntf(" ").
  - Utilize show_stat() in sidewaysintpr() loop. This makes periodic
    statistics to honor -h flag.

Approved by:	re (kensmith)
2005-09-29 13:19:10 +00:00
brueffer
d687ed0ea8 MFC: rev. 1.6
Fix typo.

Approved by:	re (hrs)
2005-09-28 16:51:27 +00:00
ru
25fd00f1d2 MFC: 1.57: Respect IFF_PROMISC.
Approved by:	re (scottl)
2005-09-28 16:46:17 +00:00
kensmith
f46dc59c05 MFC v1.43: Move hme_stop() BEFORE ether_ifdetach() and if_free() to
prevent a memory-referenced-after-free panic if the hme interface
fails to attach.

Patch obtained from:	marius
Suggested same thing:	brooks
Approved by:		re (scottl)
2005-09-28 14:10:00 +00:00
kensmith
08dbb5ae56 MFC v1.30: Update for RELENG_6.
Approved by:	re (scottl)
2005-09-28 14:00:13 +00:00
rwatson
14efd49e2f Merge fifo_vnops.c:1.129 from HEAD to RELENG_6:
Lock the read socket receive buffer when frobbing the sb_state flag on
  that socket during open, not the write socket receive buffer.

  Spotted by:	ups

Approved by:	re (scottl)
2005-09-28 06:55:02 +00:00
rwatson
20bc206faa Merge uipc_usrreq.c:1.156 from HEAD to RELENG_6:
Canonicalize the UNIX domain socket copyright layout: original holders
  before more recent holders.

Approved by:	re (scottl)
2005-09-28 06:52:10 +00:00
rwatson
442db0620a Merge fifo_vnops.c:1.128 from HEAD to RELENG_6:
For reasons of consistency (and necessity), assert an exclusive vnode
  lock on the fifo vnode in fifo_open(): we rely on the vnode lock to
  serialize access to v_fifoinfo.

Approved by:	re (scottl)
2005-09-28 06:47:32 +00:00
rwatson
bb13f5c766 Merge uipc_socket.c:1.249, socket.h:1.89 from HEAD to RELENG_6:
Add three new read-only socket options, which allow regression tests
  and other applications to query the state of the stack regarding the
  accept queue on a listen socket:

  SO_LISTENQLIMIT    Return the value of so_qlimit (socket backlog)
  SO_LISTENQLEN      Return the value of so_qlen (complete sockets)
  SO_LISTENINCQLEN   Return the value of so_incqlen (incomplete sockets)

  Minor white space tweaks to existing socket options to make them
  consistent.

  Discussed with: andre

Approved by:	re (scottl)
2005-09-27 21:14:10 +00:00
mlaier
8d659a8778 Document bridge(4) removal.
Approved by:	re (scottl)
2005-09-27 18:51:02 +00:00
imp
3d75a75160 MFC: CIS exported to userland, and a number of cosmetic fixups
Approved by: re@ (scottl)
2005-09-27 18:42:20 +00:00
delphij
2e3c58f846 MFC 1.64: Restore a historical ufs_inactive behavior that respect
the RDONLY option, so subsequent call of UFS_TRUNCATE (ffs_truncate)
would not panic the system.  This fixes a panic that can happen
when mounting a corrputed filesystem read-only, and reading data
from it.

Reviewed by:	mckusick
Approved by:	re (scottl)
2005-09-27 17:03:53 +00:00
mp
96e1d5303d Bump up BUFSIZE from 4k to 8k. This was requested by portmgr@ to allow
ports builds in the cluster to work correctly.

Approved by: re
2005-09-27 14:49:41 +00:00
krion
1f7ce2bb5e MFC: 1.20
date: 2005/09/24 21:41:47;  author: krion;  state: Exp;  lines: +1 -1
  Do not bitch about bsdpan modules not having origin.

  Based on PR:    bin/82269
  Submitted by:   Steven Hartland <killing at multiplay dot co dot uk>
  MFC after:      3 days

Approved by:	re (kensmith)
2005-09-27 13:39:06 +00:00
krion
79857f671c MFC: 1.39
date: 2005/09/24 19:41:56;  author: krion;  state: Exp;  lines: +1 -1
    Remove '\n' since it's redundant in case if file doesn't exist while
    running 'pkg_info -g'

    Based on PR:    bin/42609
    Submitted by:   Jeff King <peff-freebsd at peff dot net>
    MFC after:      3 days

Approved by:	re (kensmith)
2005-09-27 13:37:53 +00:00
davidxu
54f46820e2 MFC kern/sys_process.c revision 1.132
kern/kern_kse.c    revision 1.215

     > Fix a LOR between sched_lock and sleep queue lock.

Approved by: re(scottl)
2005-09-27 12:17:38 +00:00
davidxu
03359b164a MFC revisions 1.156 - 1.159, improve stability of ULE scheduler.
Approved by: re (scottl)
2005-09-27 12:00:31 +00:00
imp
7c9e67d3ae MFC: 1.297 and 1.298
Split the do_powerstaes knob into do_power_resume and do_power_nodriver.
Go ahead and enable power state management for suspend/resume, but leave
the nodriver powerdown off by default.  The MFC that changed do_power_state
default to 0 broke some resume on some laptops.

Approved by: re@ (scottl)
2005-09-27 05:57:47 +00:00
jhb
76e4abfa33 MFC: Stop using the '+' constraint modifier with memory operands in
inline assembly.  We still use it for register operands in various places.

Approved by:	re (kensmith)
2005-09-26 19:54:19 +00:00
jhb
ed90752feb MFC: Adjust comment to note that we now do handle the PMC LVT entry and
try to avoid recursively panicing.

Approved by:	re (kensmith)
2005-09-26 19:50:38 +00:00
jhb
74ef9d3c8a MFC: Use the new thread no sleeping facility to replace the g_xup, g_xdown,
and dont_sleep_in_callout mutexes.  Also, disallow sleeping in hardware
interrupt handlers.

Approved by:	re (kensmith)
2005-09-26 19:49:12 +00:00
jhb
de60f2213a MFC: Add a new simple facility for marking the current thread as being in a
state where sleeping on a sleep queue is not allowed.

Approved by:	re (kensmith)
2005-09-26 19:43:37 +00:00
jhb
0f21530145 MFC: Explicitly switch to the new TSS when adding one in i386_extend_pcb().
Approved by:	re (kensmith)
2005-09-26 19:38:12 +00:00
jhb
02ea2b090c MFC: Fixup locking and mark MPSAFE.
Approved by:	re (kensmith)
2005-09-26 19:36:38 +00:00
jhb
277d7bc3b0 MFC: Add a memory barrier for PREWRITE operations to ensure all writes by
the CPU have drained before further writes to kick off the DMA operation.

Approved by:	re (kensmith)
2005-09-26 19:35:33 +00:00
phk
8763ae81c0 MFC:
Fixes for various races in md.

Approved by:	re@ (scottl)
2005-09-26 18:14:38 +00:00
damien
0984404791 sync with HEAD.
o Brings WME and IBSS support.
o Fix association with APs hiding their SSIDs.

Approved by:	re (scottl)
2005-09-26 17:31:36 +00:00
damien
1851421db0 sync with HEAD.
Approved by:	re (scottl)
2005-09-26 17:21:15 +00:00
phk
8aebf05b22 MFC:
nanobsd conversion to shell script.

Approved by:	re@ (scottl)
2005-09-26 15:00:49 +00:00
glebius
5dcd652b76 MFC 1.80:
- Understand EADDRINUSE, and forget EDQUOT. [1]
  - Add description for EEXIST.
  - Change description for ENOBUFS. Routing socket can return
    this error for many different reasons, including general
    memory shortage, mbuf memory shortage and rtentry zone.

  PR:	kern/64090 [1]

Approved by:	re (scottl)
2005-09-26 15:00:34 +00:00
glebius
eea24f1858 MFC 1.113:
Several fixes to rt_setgate(), that fix problems with route changing:

  - Rearrange code so that in a case of failure the affected
    route is not changed. Otherwise, a bogus rtentry will be
    left and later rt_check() can recurse on its lock. [1]
  - Remove comment about protocol cloning.
  - Fix two places where rtentry mutex was recursed on, because
    accessed via two different pointers, that were actually pointing
    to the same rtentry in some cases. [1]
  - Return EADDRINUSE instead of bogus EDQUOT, in case when gateway
    uses the same route. [2]

  Reported & tested by:	ps, Andrej Zverev <az inec.ru> [1]
  PR:			kern/64090 [2]

Approved by:	re (scottl)
2005-09-26 14:59:12 +00:00
glebius
cd205d9454 MFC 1.71, 1.72:
Check IFF_DRV_RUNNING before calling em_start_locked().

Approved by:	re (scottl)
2005-09-26 14:46:10 +00:00
phk
6c1584f5fc MFC:
DEVFS fixes of many sorts.

Approved by:	re@ (scottl)
2005-09-26 14:36:54 +00:00
andre
3fe532433d MFC 1.160: Undo optimization which broke BIOCGSEESENT handling.
Approved by:	re (scottl)
2005-09-26 12:06:18 +00:00
andre
16ee6d8644 MFC 1.77: Do not ignore all other TCP options when TCP_MD5.
Approved by:	re (scottl)
2005-09-26 12:03:37 +00:00
thompsa
1d1e4f1a56 MFC: if_bridge.c, r1.22
> Fix an alignment panic my preserving the 2byte padding (ETHER_ALIGN) on our
> copied mbuf, which keeps the IP header 32-bit aligned. This copied mbuf is
> reinjected back into ether_input and off to the IP routines.
>
> Reported and tested by: Peter van Dijk

Approved by:	re (scottl), mlaier (mentor)
2005-09-25 20:36:02 +00:00
rwatson
6d0981051c Merge kern_acct.c:1.75 from HEAD to RELENG_6:
Pass 'curthread' into VFS_STATFS() from acctwatch(), rather than passing
  NULL.  The NFS client expects that a thread will always be present for a
  VOP so that it can check for signal conditions, and will dereference a
  NULL pointer if one isn't present.

Approved by:	re (scottl)
2005-09-25 18:54:28 +00:00
rwatson
8a0d15098c Merge Makefile:1.262, namei.9:1.27, and VFS_LOCK_GIANT.9:1.1 from
HEAD to RELENG_6:

  Add discussion of Giant, the MPSAFE flag, and NDHASGIANT() to namei(9).

  Add a VFS_LOCK_GIANT(9)/VFS_UNLOCK_GIANT(9) man page.

  Discussed with: jeff

Approved by:	re (hrs)
2005-09-25 18:51:45 +00:00