8820 Commits

Author SHA1 Message Date
davidxu
c07d62133b MFC following revisions:
sys/ptrace.h		1.27
	kern/sys_process	1.135

	get LWP's signal info.
2006-05-17 00:41:49 +00:00
ps
ba7f78e7d1 MFC: Allow for nmbclusters and maxsockets to be increased via sysctl. 2006-05-16 07:27:49 +00:00
davidxu
846f661226 MFC revision 1.101 2006-05-16 00:23:44 +00:00
ps
01b2a3d145 MFC: rev 1.329
Don't try to kill embryonic processes in  killpg1().  This prevents
a race condition between fork() and kill(pid,sig) with pid < 0 that
can cause a kernel panic.
2006-05-15 18:53:00 +00:00
ps
2f5ab57b80 MFC: Properly support for FreeBSD 4 32bit System V shared memory.
Submitted by:	peter
2006-05-15 18:47:52 +00:00
ps
c3bbc5629b MFC: 32bit sendfile support 2006-05-15 18:34:06 +00:00
tegge
09952cce7b MFC: Call vn_finished_write() before calling the coredump handler which will
indirectly call vn_start_write() as necessary for each write.
2006-05-14 01:07:48 +00:00
tegge
d09d10cb05 MFC: Temporarily unlock vnode for new image being executed to avoid lock
order reversals that can lead to deadlocks.  Normally vn_close(),
     namei() or vrele() should not be called while holding vnode locks.
2006-05-14 00:46:13 +00:00
pjd
0b852a3c37 MFC: sys/kern/vfs_subr.c 1.671
vn_start_write()/vn_finished_write() is not needed here, because
vn_start_write() is always called earlier in the code path and calling
the function recursively may lead to a deadlock.

Confirmed by:	tegge
2006-05-13 14:01:35 +00:00
pjd
c21f8ac91a MFC: sys/kern/kern_shutdown.c 1.178
sys/vm/swap_pager.h		1.51
	sys/vm/swap_pager.c		1.278,1.279

On shutdown try to turn off all swap devices. This way GEOM providers are
properly closed on shutdown.

Requested by:	ru
Reviewed by:	alc
2006-05-10 07:00:09 +00:00
scottl
0f81ec8494 MFC rev 1.669. This is done only because the change has been tested for a
month, and then only because it has been heavily reviewed and recommended.

Approved by: re
2006-05-04 07:42:52 +00:00
davidxu
7bedbff357 MFC revision 1.27:
> Clear TDF_SINTR in sleepq_resume_thread, also sleepq_catch_signal does
> not need to clear it now, this should fix panic when msleep is recursivly
> called. Patch is slightly adjusted after review.

Approved by: re (scottl)
2006-04-30 23:24:33 +00:00
kris
6e25448c70 MFC r1.90, r1.91:
> - Lock giant when assigning ni_vp and keep vfslocked state valid.

> - Consistently track ni_dvp and ni_vp with dvfslocked and vfslocked rather
>   than trying to optimize it into a single lock.  This adds more calls to
>   lock giant with non smpsafe filesystems but is the only way to reliably
>   hold the correct lock.
> - Remove an invalid assert in the mountedhere case in lookup and fix the
>   code to properly deal with the scenario.  We can actually have a lookup
>   that returns dp == dvp with mountedhere set with certain unmount races.

Approved by:	re (scottl)
2006-04-30 03:57:46 +00:00
jhb
e83605b8fb MFC: Drop the kqueue global mutex as soon as we are finished with it.
Approved by:	re (scottl)
2006-04-19 15:47:36 +00:00
jhb
5fdfe3a592 MFC 1.200: Fix compile w/o DDB.
Approved by:	re (scottl)
2006-04-19 15:45:29 +00:00
scottl
6f5cbcee73 Fix compile breakage.
Approved by: re (implicit)
2006-04-15 19:08:26 +00:00
jhb
9bc5483374 MFC: Activate ithread_destroy() (but rename it to ithread_destroy2() for
ABI reasons) and call it from intr_event_destroy().
Only in 6: Add API and ABI compat shims for ithread_destroy() to call
intr_event_destroy().

Approved by:	re (scottl)
Tested by:	Artem Ignatiev <zazubrik@mail.ru>
2006-04-13 17:31:01 +00:00
pjd
507348da3c MFC: sys/kern/md5c.c 1.27
Fix a panic on sparc64 related to inproper aligment - we cannot assume,
that 'unsigned char *' argument is 4 byte aligned.

Approved by:	re (scottl)
2006-04-05 22:15:00 +00:00
jhb
1fb84f1627 MFC: Always explicitly panic in propogate_priority() if we try to propogate
a lock's priority to a sleeping thread.

Approved by:	re (scottl)
2006-04-05 21:15:19 +00:00
jmg
54d356d5da MFC: kern_event.c v1.97
clear any action flags on the register knote

Approved by:	re (scottl)
2006-04-04 17:31:46 +00:00
jmg
51d5400d46 MFC: kern_event.c v1.96
fix race condition

Approved by:	re (hrs)
2006-04-02 08:22:43 +00:00
sam
00fd49629b backout taskqueue changes
Approved by:	re (scottl)
2006-04-02 00:14:57 +00:00
kris
a6d8ed18f8 MFC r1.89:
- LK_RETRY means nothing when passed to VOP_LOCK.  Call vn_lock instead.
 - Move the vn_lock of the dvp until after we've unbusied the filesystem
   to avoid a LOR with the mount point lock.
 - In the v_mountedhere while loop we acquire a new instance of giant each
   time through without releasing the first.  This would cause us to leak
   Giant.

Sponsored by:   Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-31 07:39:24 +00:00
csjp
7bdd1005e6 MFC 1.144 tty_pty.c
Allow root to open jail PTYs from the host environment. This un-breaks using
utilities like watch(8) (or other programs which use snp(4)) to monitor
behavior within prisons from the host environment. This regression was
introduced when we changed the ioctl(SNPSTTY) to use a file descriptor
instead of a dev_t

Approved by:	re (hrs)
2006-03-30 16:46:56 +00:00
davidxu
b75d026a4e MFC revision 1.232, 1.233, fix thread suspension race.
Approved by: re (kensmith)
2006-03-26 01:29:55 +00:00
sam
87fb33de86 MFC: promote fast ipsec's m_clone routine for public use; it is renamed
m_unshare and the caller can now control how mbufs are allocated

Approved by:	re (hrs)
2006-03-23 23:24:33 +00:00
csjp
f3b5ccdb54 MFC descriptor fixes in hopes of killing the "dup(2) regression on 6.x" show
stopper item on the 6.1-RELEASE TODO list.

Approved by:	re (scottl)
2006-03-23 04:07:01 +00:00
tegge
b93a63cac4 MFC: Let snapshots make a copy of old contents for all buffers taking part
in a cluster instead of just the first buffer.

     Delay buf_start() calls until snapshots have a copy of old content.

     Allow compilation when not using softupdates.

     Remove unused leaked debug function prototype.

PR:		kern/93942
Approved by:	re (kensmith)
2006-03-22 17:54:50 +00:00
tegge
b9a0371626 MFC: Don't call vn_finished_write() if vn_start_write() failed.
Approved by:	re (kensmith)
2006-03-22 17:34:39 +00:00
davidxu
5ee78a5b24 MFC revision 1.258.
Approved by: re (mux)
2006-03-18 23:37:36 +00:00
davidxu
3b744ce278 MFC kern_thread.c revision 1.231
kern_exit.c   revision 1.286

    calcu fix for threaded process.

Approved by: re (mux)
2006-03-18 23:36:21 +00:00
glebius
4ff9bbbe0f MFC 1.21,1.22:
Fix several typos and trim spaces at eol.

  PR:		kern/93759
  Submitted by:	Antoine Brodin <antoine.brodin laposte.net>

Approved by:	re (mux)
2006-03-18 21:55:43 +00:00
jhb
b10d27f0a1 Add a compat API shim for ithread_remove_handler().
Approved by:	re (mux)
2006-03-17 17:32:46 +00:00
rwatson
1cb719ab5e Regenerate.
Approved by:	re (scottl)
2006-03-17 01:47:33 +00:00
rwatson
3d5d8935a4 Provide unconditionally compiled stub implementations of audit system
calls that simply return ENOSYS.  This will allow basic forward
compatibility with userland audit pieces to be committed in the future,
avoiding the "login killed by SIGSYS" problem users of CVS HEAD
experienced when booting older kernels with newer user spaces (an
unsupported but not uncommon situation when debugging problems).

Approved by:	re (scottl)
Obtained from:	TrustedBSD Project
2006-03-17 01:47:06 +00:00
alc
215850cc69 MFC
File                  Revisions
  kern/imgact_aout.c    1.100
  kern/imgact_elf.c     1.167-1.172, 1.175
  kern/imgact_gzip.c    1.55
  vm/vm_extern.h        1.77
  vm/vm_glue.c          1.214

  Use sf_buf_alloc() instead of vm_map_find() on exec_map to create
  the ephemeral mappings that are used as the source for three copy
  operations from kernel space to user space.  There are two reasons
  for making this change: (1) Under heavy load exec_map can fill up
  causing vm_map_find() to fail.  When it fails, the nascent process
  is aborted (SIGABRT).  Whereas, this reimplementation using
  sf_buf_alloc() sleeps.  (2) Although it is possible to sleep on
  vm_map_find()'s failure until address space becomes available (see
  kmem_alloc_wait()), using sf_buf_alloc() is faster.  Furthermore,
  the reimplementation uses a CPU private mapping, avoiding a TLB
  shootdown on multiprocessors.

  The second argument to vm_map_find() should be NULL instead of 0.

  Correct a long-standing problem in elfN_map_insert(): In order to
  copy a page to user space, the user space mapping must allow write
  access.

  Eliminate an unneeded (vm_prot_t) parameter from two functions.
  Eliminate unnecessary uses of a local variable.

  Maintain the vnode lock throughout elfN_load_file() rather than
  releasing it and reacquiring it in vrele().  Consequently, there is
  no reason to increase the reference count on the vm object caching
  the file's pages.

  Eliminate unused parameters to elfN_load_file().

  Maintain the lock on the vnode for most of exec_elfN_imgact().
  Specifically, it is required for the I/O that may be performed by
  elfN_load_section().

  Avoid an obscure deadlock in the a.out, elf, and gzip image
  activators.  Add a comment describing why the deadlock does not
  occur in the common case and how it might occur in less usual
  circumstances.

  Eliminate an unused variable from exec_aout_imgact().

  Avoid a vm object reference leak in a rarely used code path.

  An executable contains at most one PT_INTERP program header.
  Therefore, the loop that searches for it can terminate after it is
  found rather than iterating over the entire set of program headers.

  Eliminate an unneeded initialization.

Approved by: re (mux)
2006-03-16 00:25:32 +00:00
sam
d92cfb93fe MFC: sync taskqueue api with HEAD modulo preserving the calling
convention for taskqueue_create

Reviewed by:	various
Approved by:	re (scottl)
2006-03-14 23:28:30 +00:00
jeff
d5d2e86c35 MFC Revs 1.237, 1.236, 1.234
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:44 +00:00
jeff
d4dc0bfa32 MFC Revs 1.409, 1.404, 1.403, 1.402, 1.401
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:39 +00:00
jeff
15991fa641 MFC Revs 1.664, 1.661, 1.660, 1.659, 1.658, 1.657
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:34 +00:00
jeff
eb115b5c61 MFC Revs 1.218, 1.217, 1.216
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:27 +00:00
jeff
ffb6920658 MFC Revs 1.88, 1.86
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:22 +00:00
jeff
6bab28a53a MFC Rev 1.128
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:17 +00:00
jeff
9a5748c961 MFC Rev 1.104
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:14 +00:00
jeff
ea3727c864 MFC Revs 1.503, 1.501, 1.493
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:09 +00:00
jeff
e99e58aba2 MFC Rev 1.162
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:06:03 +00:00
jeff
38c064b9bd MFC Rev 1.177
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:05:54 +00:00
jeff
b46ca49877 MFC Revs 1.96, 1.91, 1.90
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:05:50 +00:00
jeff
3fa60901d6 MFC Rev 1.107
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:05:47 +00:00
jeff
0fba4c736a MFC Rev 1.288
VFS SMP fixes, stack api, softupdates fixes.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (scottl)
2006-03-13 03:05:42 +00:00