summaryrefslogtreecommitdiffstats
path: root/sys/kern
Commit message (Collapse)AuthorAgeFilesLines
...
* Grrr, this committer needs to have a sleep. Remove lines from the previoussobomax2005-01-291-3/+0
| | | | | | delta not intended for public consumption. MFC after: 2 weeks
* Fix small non-conformance introduced in the previous commit: execve() issobomax2005-01-291-4/+4
| | | | | | | expected to return ENAMETOOLONG, not E2BIG if first argument doesn't fit into {PATH_MAX} bytes. MFC after: 2 weeks
* o Split out kernel part of execve(2) syscall into two parts: one thatsobomax2005-01-296-163/+215
| | | | | | | | | | | copies arguments into the kernel space and one that operates completely in the kernel space; o use kernel-only version of execve(2) to kill another stackgap in linuxlator/i386. Obtained from: DragonFlyBSD (partially) MFC after: 2 weeks
* Correct a minr whitespace inconsistency introduced in revision 1.159:rwatson2005-01-291-1/+1
| | | | add a tab between #define and DF_REBID instead of a space.
* Use MAXMINORphk2005-01-291-5/+5
|
* Typo.phk2005-01-291-1/+1
|
* Add MAXMINOR #define, we should have had this long time ago.phk2005-01-291-3/+9
| | | | | | | | Add minor2unit() in addition to dev2unit() and unit2minor(). If it wasn't such a hazzle we should redefine minor numbers in the kernel without the gap for the major number, but it's not worth the bother (yet).
* In 1.276 of kern/subr_trap.c I introduced a mechanism for delayingphk2005-01-291-0/+7
| | | | | | | | | | a process return to userspace if it had pending GEOM events. We need to have the same check in the exit pass to catch the case where a GEOM related filedescriptor is not explicitly closed by the process. Bumped into by: people using dd(1) to build releases, nanobsd etc.
* - Don't drop the wref on the bufobj until after bufdone() has completed.jeff2005-01-281-7/+10
| | | | | | | Without this, threads waiting in bufobj_wwait() may wakeup prior to bufdone() completing. Sponsored by: Isilon Systems, Inc.
* Remove unused argument to vrecycle()phk2005-01-281-7/+1
|
* Integrate vclean() into vgonel().phk2005-01-281-68/+51
| | | | Various associated polishing.
* Remove register keywordphk2005-01-281-5/+5
|
* Move the contents of vop_stddestroyvobject() to the new vnode_pagerphk2005-01-281-26/+2
| | | | | | | function vnode_destroy_vobject(). Make the new function zero the vp->v_object pointer so we can tell if a call is missing.
* - Regenjeff2005-01-261-3/+3
|
* - Struct mount is not yet locked well enough to allowjeff2005-01-261-3/+3
| | | | mount/nmount/unmount to run without Giant. Mark them as STD here.
* Split out kernel side of msgctl(2) into two parts: the first that pops datasobomax2005-01-261-21/+37
| | | | | | | | from the userland and pushes results back and the second which does actual processing. Use the latter to eliminate stackgap in the linux wrapper of that syscall. MFC after: 2 weeks
* Split out kernel side of {get,set}itimer(2) into two parts: the first thatsobomax2005-01-251-34/+55
| | | | | | | | pops data from the userland and pushes results back and the second which does actual processing. Use the latter to eliminate stackgap in the linux wrappers of those syscalls. MFC after: 2 weeks
* - Include LK_INTERLOCK in LK_EXTFLG_MASK so that it makes its way intojeff2005-01-251-1/+1
| | | | | | | | acquire. - Correct the condition that causes us to skip apause() to only require the presence of LK_INTERLOCK. Sponsored by: Isilon Systems, Inc.
* - Make lf_print static and move its prototype into kern_lockf.cjeff2005-01-251-18/+40
| | | | | | | - Protect all of the advlock code with Giant as some filesystems may not be entering with Giant held now. Sponsored by: Isilon Systems, Inc.
* Previously a read of zero bytes got handled in devfs:vop_read() but Iphk2005-01-251-0/+12
| | | | | | | | | missed that when the vnode bypass was introduced. Deal with zero length transfers before we even get to fo_ops->fo_read(). Found by: Slawa Olhovchenkov <slwzxy.spb.ru@zxy.spb.ru> PR: 75758
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.phk2005-01-252-32/+0
|
* Don't use VOP_GETVOBJECT, use vp->v_object directly.phk2005-01-258-37/+35
|
* Kill VOP_CREATEVOBJECT(), it is now the responsibility of the filesystemphk2005-01-252-23/+0
| | | | for a given vnode to create a vnode_pager object if one is needed.
* Don't call VOP_CREATEVOBJECT(), it's the responsibility of thephk2005-01-244-70/+2
| | | | filesystem which owns the vnode.
* Eliminate the constant flags argument to vclean()phk2005-01-241-16/+8
|
* Move the body of vop_stdcreatevobject() over to the vnode_pager underphk2005-01-241-50/+1
| | | | | | | | | | | the name Sande^H^H^H^H^Hvnode_create_vobject(). Make the new function take a size argument which removes the need for a VOP_STAT() or a very pessimistic guess for disks. Call that new function from vop_stdcreatevobject(). Make vnode_pager_alloc() private now that its only user came home.
* Save a line by unlocking before we test.phk2005-01-241-2/+1
|
* Change vprint() to vn_printf() which takes varargs.phk2005-01-241-12/+15
| | | | Add #define for vprint() to call vn_printf().
* Kill the VV_OBJBUF and test the v_object for NULL instead.phk2005-01-243-8/+4
|
* Fix a list corruption issue in cloning device management using thephk2005-01-241-16/+41
| | | | | western strategy ("allocate first, ask questions later") so we can extend the devmtx coverage to the clone list.
* - Convert so_qlen, so_incqlen, so_qlimit fields of struct socket fromglebius2005-01-241-2/+23
| | | | | | | | | | | short to unsigned short. - Add SYSCTL_PROC() around somaxconn, not accepting values < 1 or > U_SHRTMAX. Before this change setting somaxconn to smth above 32767 and calling listen(fd, -1) lead to a socket, which doesn't accept connections at all. Reviewed by: rwatson Reported by: Igor Sysoev
* - Regen for recent vfs syscall changes.jeff2005-01-242-48/+48
| | | | Sponsored By: Isilon Systems, Inc.
* - Change all VFS syscalls to MSTD as they all manually deal with giantjeff2005-01-241-46/+46
| | | | | | or the appropriate filesystem locks. Sponsored By: Isilon Systems, Inc.
* - Add CTR calls to trace the lifecycle of a buffer.jeff2005-01-241-79/+84
| | | | | | | | | | | | | | | | | - Remove some KASSERTs which are invalid if the appropriate lock is not held. - Slightly restructure bremfree() so that it is more sane. - Change the flush code in bdwrite() to avoid acquiring a mutex whenever possible. - Change the flush code in bdwrite() to avoid holding the bufobj mutex while calling buf_countdeps(). This introduces a lock-order relationship with the softdep lock that can not otherwise be resolved. - Don't set B_DONE until bufdone() is complete, otherwise another processor may believe the buf is done before it is. - Only acquire Giant if the caller has set b_iodone. Don't grab giant around normal bufdone() calls. Sponsored By: Isilon Systems, Inc.
* - Add the tunable and sysctl for the mpsafevfs. It currently defaultsjeff2005-01-241-37/+49
| | | | | | | | | | | | | | | to off. - Protect access to mnt_kern_flag with the mointpoint mutex. - Remove some KASSERTs which are not legal checks without the appropriate locks held. - Use VCANRECYCLE() rather than rolling several slightly different checks together. - Return from vtryrecycle() with a recycled vnode rather than a locked vnode. This simplifies some locking. - Remove several GIANT_REQUIRED lines. - Add a few KASSERTs to help with INACT debugging. Sponsored By: Isilon Systems, Inc.
* - Remove GIANT_REQUIRED where giant is no longer required.jeff2005-01-241-6/+0
| | | | Sponsored By: Isilon Systems, Inc.
* - Remove GIANT_REQUIRED where it is no longer required.jeff2005-01-241-4/+0
| | | | Sponsored By: Isilon Systems, Inc.
* - Remove GIANT_REQUIRED where giant is no longer required.jeff2005-01-241-54/+81
| | | | | | | | | | | | | - Protect access to mnt_kern_flag with the mountpoint mutex. - Use the appropriate nd flags to deal with giant in vn_open_cred(). We currently determine whether the caller is mpsafe by checking for a valid fdidx. Any caller coming from user-space is now mpsafe and supplies a valid fd. No kenrel callers have been converted to mpsafe, so this check is sufficient for now. - Use VFS_LOCK_GIANT instead of manual giant acquisition where appropriate. Sponsored By: Isilon Systems, Inc.
* - Protect mnt_kern_flag with the mountpoint's mutex. This is requiredjeff2005-01-241-7/+11
| | | | | | to make the suspend related functions mpsafe. Sponsored By: Isilon Systems, Inc.
* - Acquire and release Giant as we enter and leave filesystems whichjeff2005-01-241-6/+37
| | | | | | | | | require it. - Track the status of Giant with the nd flag HASGIANT. - Release giant on return of namei() callers are not marked MPSAFE as they already own giant. Sponsored By: Isilon Systems, Inc.
* - Change all vfs syscalls to use VFS_LOCK_GIANT(), and MPSAFE nds.jeff2005-01-242-200/+532
| | | | | | | - Move Giant acquisition into the few vfs syscalls that weren't already directly acquiring it. Sponsored By: Isilon Systems, Inc.
* - Simplify the cache locking. The lock order relationship with thejeff2005-01-241-37/+33
| | | | | | | | | vnode lock is much simpler than I originally thought it would be. Now, the cache lock is always acquired before the vnode lock. - Provide some gotos in __getcwd() to simplify the unlocking a bit. - Move Giant acquisition down into __getcwd(). Sponsored By: Isilon Systems, Inc.
* - Do not use APAUSE if LK_INTERLOCK is set. We lose synchronizationjeff2005-01-241-10/+19
| | | | | | | | if the lockmgr interlock is dropped after the caller's interlock is dropped. - Change some lockmgr KTRs to be slightly more helpful. Sponsored By: Isilon Systems, Inc.
* - Use VFS_LOCK_GIANT() in place of mtx_lock(&giant), etc.jeff2005-01-241-9/+9
| | | | Sponsored By: Isilon Systems, Inc.
* Style cleanup: with removal of mutex operations, we can also removerwatson2005-01-231-4/+2
| | | | | | {}'s from securelevel_gt() and securelevel_ge(). MFC after: 1 week
* When reading pr_securelevel from a prison, perform a lockless read,rwatson2005-01-231-4/+0
| | | | | | | as it's an integer read operation and the resulting slight race is acceptable. MFC after: 1 week
* When retrieving the current per-jails securelevel for a sysctl read,rwatson2005-01-231-5/+4
| | | | | | | don't acquire the prison mutex, as it's an integer read and races here don't make a difference. MFC after: 1 week
* When DDB is not defined, don't implement witness_thread_has_locks() andrwatson2005-01-221-0/+2
| | | | | | | | witness_proc_has_locks(), as they are unused, which results in a compiler error. This problem was introduced with the implementation of "show alllocks". Spotted by: Artem Kuchin <matrix at itlegion dot ru>
* Invoke label initialization, creation, cleanup, and tear-down MACrwatson2005-01-221-0/+95
| | | | | | | | Framework entry points for System V IPC shared memory. Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net> Obtained from: TrustedBSD Project Sponsored by: DARPA, SPAWAR, McAfee Research
* Invoke label initialization, creation, cleanup, and tear-down MACrwatson2005-01-221-0/+83
| | | | | | | | Framework entry points for System V IPC semaphores. Submitted by: Dandekar Hrishikesh <rishi_dandekar at sbcglobal dot net> Obtained from: TrustedBSD Project Sponsored by: DARPA, SPAWAR, McAfee Research
OpenPOWER on IntegriCloud