'show thread' (currently doesn't work due to a ddb bug that in 6.x
that causes 'show thread' to be treated as 'show threads'), 'show lockmgr',
'show sleepchain', 'show lockchain', 'show allchains', 'show locktree',
'show sleepq', and 'show turnstile'.
Use NET_LOCK_GIANT() and VFS_LOCK_GIANT() instead of unconditionally
acquiring Giant in kern_sendfile().
Guard against the forced reclamation of a vnode in kern_sendfile().
- Teach WITNESS_SAVE() and WITNESS_RESTORE() to work with spin locks instead
of only sleep locks.
- Do the extra step required when destroying a locked spin mutex.
- Initialize thread0.td_contested in init_turnstiles() rather than
mutex_init().
- Add LOCK_CLASS() macro and sync with HEAD on its usage. For RELENG_6
this just maps to lock->lo_class. (In HEAD lo_class was removed an array
index was encoded into lo_flags instead.)
- Add subr_lock.c including adding lock_init() and lock_destroy() functions
as we as moving the 'show lock' command into this file from kern_mutex.c.
Re-order MAC and DAC checks in shmget() in order to give precedence to
the MAC result, as well as avoid losing the DAC check result when MAC
is enabled.
Reported by: Patrick LeBlanc <Patrick dot LeBlanc at sparta dot com>
Reminded by: shangjie dot li at gmail dot com
linked SCM_CREDS control messages and then add a control message with
struct sockcred so the process specifically asked for the peer credentials
by LOCAL_CREDS option always gets struct sockcred.
Create bus_enumerate_hinted_children. This routine will allow
drivers to use the hinted child system. Bus drivers that use
this need to implmenet the bus_hinted_child method, where they
actually add the child to their bus, as they see fit. The bus
is repsonsible for getting the attribtues for the child,
adding it in the right order, etc. ISA hinting will be
updated to use this method.
Remove sbinsertoob(), sbinsertoob_locked(). They violate (and have
basically always violated) invariannts of soreceive(), which assume
that the first mbuf pointer in a receive socket buffer can't change
while the SB_LOCK sleepable lock is held on the socket buffer,
which is precisely what these functions do. No current protocols
invoke these functions, and removing them will help discourage them
from ever being used. I should have removed them years ago, but
lost track of it.
Prodded almost by accident by: peter
ext2_vfsops.c:1.157, cd9660_vfsops.c:1.145, ffs_vfsops.c:1.314,
reiserfs_vfsops.c:1.5
Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems. Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.
Add a sysctl, regression.sonewconn_earlytest, which when options
REGRESSION is enabled, allows user space to dictate that sonewconn()
should skip it's "skip the hard work" check to see if the listen
queue is full, and instead proceed with allocation of a socket and
trimming of the overflowed queue. This makes it easier to test the
queue overflow logic.
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.
Factor out part of exit1() into new function vmspace_exit(). Attach
to vmspace0 to allow old vmspace to be freed earlier.
Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process. Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.
Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
In devfs_first(), set mp->mnt_opt to a valid empty list of mount options
instead of leaving it NULL. This eliminates a kernel panic
when trying to do a mount -o update of /dev.
Noticed by: cjsp
Reviewed by: phk
date: 2006/04/10 14:07:28; author: csjp; state: Exp; lines: +0 -2
Kill the last Giant acquisition in the exit(2) code. This Giant acquisition
doesn't appear to be protecting anything. Most of consumers funsetownlst(9)
do not appear to be picking up Giant anywhere. This was originally a part
of my Giant exit(2) clean up revision 1.272 but I thought it was a good idea
to leave it out until we were able to analyze it better.
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.
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
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
> 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)
> - 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)
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>