summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Add the splvm()'s suggested in PR 20609 to protect vm_pager_page_unswapped().dillon2000-11-181-0/+3
| | | | | | The remainder of the PR is still open. PR: kern/20609 (partial fix)
* This patchset fixes a large number of file descriptor race conditions.dillon2000-11-1817-245/+1789
| | | | | | | | | | | | Pre-rfork code assumed inherent locking of a process's file descriptor array. However, with the advent of rfork() the file descriptor table could be shared between processes. This patch closes over a dozen serious race conditions related to one thread manipulating the table (e.g. closing or dup()ing a descriptor) while another is blocked in an open(), close(), fcntl(), read(), write(), etc... PR: kern/11629 Discussed with: Alexander Viro <viro@math.psu.edu>
* Further use of M_ZERO.dwmalone2000-11-185-13/+7
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: msmith
* Add the use of M_ZERO to netgraph.dwmalone2000-11-1823-66/+36
| | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Submitted by: archie Approved by: archie
* Fix a braino ..sos2000-11-181-1/+1
|
* do not blindly assume 8khz is supported on open(). try for 8khz but respectcg2000-11-181-3/+6
| | | | | | minspeed/maxspeed specified by the hw driver. Submitted by: Andrew Gordon <arg@arg1.demon.co.uk>
* Use vop_defaultop() instead of ntfs_bypass().bp2000-11-182-4/+12
| | | | PR: kern/22756
* Release sched_lock very briefly to give interrupts a chance to fire if wejhb2000-11-181-0/+2
| | | | | | are in softclock() for a long time. The old code already did an splx()/slphigh() pair here, I just missed adding in the equivalent mutex operations on sched_lock earlier.
* Don't attempt to cluster write buffers where the VMIO flag isn't set.tegge2000-11-171-1/+2
|
* Make sure we don't cross stripe boundaries when reviving striped plexes.des2000-11-171-4/+6
| | | | | | | | | This makes crash recovery work for stripe sizes that are not multiples of DEFAULT_REVIVE_BLOCKSIZE (currently 64 kB). While we're here, fix a few cosmetic nits. Reviewed by: grog Sponsored by: Enitel ASA (http://www.enitel.no/)
* Fix the `make -jX' (X>1) breakage.obrien2000-11-175-45/+55
| | | | | Based on patch submitted by: Makoto MATSUSHITA <matusita@jp.freebsd.org> Reviewed by: marcel, bde
* - Split the run queue and sleep queue linkage, so that a processjake2000-11-1712-18/+22
| | | | | | | | | may block on a mutex while on the sleep queue without corrupting it. - Move dropping of Giant to after the acquire of sched_lock. Tested by: John Hay <jhay@icomtek.csir.co.za> jhb
* - Change extra sanity checks in cpu_switch() to be conditional on INVARIANTSjhb2000-11-173-93/+9
| | | | | | | instead of DIAGNOSTIC. - Remove the p_wchan check as it no longer applies since a process may be switched out during CURSIG() within msleep() or mawait(). - Remove an extra sanity check only needed during the early SMPng work.
* mdoc(7) police: use certified section headers wherever possible.ru2000-11-171-1/+1
|
* The default kernel filename is "kernel" again, not "kernel.ko".msmith2000-11-171-1/+1
| | | | Submitted by: mckusick
* Add the 'gdt' and 'gdtd' devices for the ICP Vortex RAID controller family.msmith2000-11-171-0/+2
|
* Go back to using data_len in struct ngpppoe_init_data after discussionsbrian2000-11-165-89/+146
| | | | | | | | | | | with Julian and Archie. Implement a new ``sizedstring'' parse type for dealing with field pairs consisting of a uint16_t followed by a data field of that size, and use this to deal with the data_len and data fields. Written by: Archie with some input by me Agreed in principle by: julian
* The recent changes to msleep() and mawait() resulted in timeout() andjhb2000-11-161-1/+16
| | | | | | | | untimeout() not being called with Giant in those functions. For now, use the sched_lock to protect the callout wheel in softclock() and in the various timeout and callout functions. Noticed by: tegge
* When checking the device code in the probe routine, leave the chip inwpaul2000-11-161-3/+22
| | | | | | | | | | | | | | | 16-bit mode. Technically, pcn_probe() is destructive because once the chip goes into 32-bit mode, the only way to get it out again is a hardware reset. And once the device is in 32-bit mode, the lnc driver won't be able to talk to it. So if pcn_probe() is called before the lnc probe routine, and pcn_probe() rejects the chip as one it doesn't support, the lnc driver will be SOL. I don't like this. I think it's a design flaw that you can't switch the chip out of 32-bit mode once it's selected. The only 'right' solution is for the pcn driver to support all of the PCI devices in 32-bit mode, however I don't have samples of all the PCnet series cards for testing.
* Add kernel option NETGRAPH_ONE2MANY.archie2000-11-164-0/+4
|
* vx is now optional rather than taking a count. Reflect that in theimp2000-11-161-2/+2
| | | | | | files. Also a minor white space nit. Submitted by: bde
* Put the probe verboseness behind bootverbosesos2000-11-161-11/+15
|
* New netgraph node type ng_one2many(4).archie2000-11-163-0/+640
|
* Don't release and acquire Giant in mi_switch(). Instead, release andjhb2000-11-1612-133/+39
| | | | | | | | acquire Giant as needed in functions that call mi_switch(). The releases need to be done outside of the sched_lock to avoid potential deadlocks from trying to acquire Giant while interrupts are disabled. Submitted by: witness
* remove redundant declaration of bsd_to_linux_sigset()gallatin2000-11-161-1/+0
| | | | reviewed by: marcel
* fix glaring bugs in rt signals -- copyout the right signal mask ingallatin2000-11-161-2/+3
| | | | | | | | linux_rt_sendsig() and restore the same signal mask linux does in rt_sigreturn(). This gets us saving/restoring all 64-bits of the linux sigset_t in rt signals. Reviewed by: marcel
* Argh, add in a missing release of the sched_lock.jhb2000-11-161-0/+1
|
* CURSIG() calls functions that acquire sleep mutexes, so it is not a goodjhb2000-11-161-3/+12
| | | | | | | | idea to be holding the sched_lock while we are calling it. As such, release sched_lock before calling CURSIG() in msleep() and mawait() and reacquire it after CURSIG() returns. Submitted by: witness
* Use the linux_connect() on alpha rather than passing directly throughgallatin2000-11-162-2/+11
| | | | | | | | | | to our native connect(). This is required to deal with the differences in the way linux handles connects on non-blocking sockets. This gets the private beta of the Compaq Linux/alpha JDK working on FreeBSD/alpha Approved by: marcel
* make the fcntl() flags match what the linux/alpha port uses, notgallatin2000-11-161-9/+11
| | | | what linux/i386 uses
* - Rename await() to mawait(). mawait() is to await() as msleep() is tojhb2000-11-152-15/+29
| | | | | | | | | tsleep(). Namely, mawait() takes an extra argument which is a mutex to drop when going to sleep. Just as with msleep(), if the priority argument includes the PDROP flag, then the mutex will be dropped and will not be reacquired when the process wakes up. - Add in a backwards compatible macro await() that passes in NULL as the mutex argument to mawait().
* - Replace a KASSERT() that knew too much about mutex internals with ajhb2000-11-151-2/+1
| | | | | mtx_assert() that ensures the mutex we release during msleep() is both not recursed and owned by the current process.
* - Convert references from tsleep() -> msleep()jhb2000-11-151-9/+9
| | | | - Fix a buglet in a comment above await()
* - Add a new macro DROP_GIANT_NOSWITCH() that is similar to DROP_GIANT()jhb2000-11-151-6/+32
| | | | | | | | | | | | except that it uses the MTX_NOSWITCH flag while it releases Giant via mtx_exit(). - Add a mtx_recursed() primitive. This primitive should only be used on a mutex owned by the current process. It will return non-zero if the mutex is recursively owned, or zero otherwise. - Add two new flags MA_RECURSED and MA_NOTRECURSED that can be used in conjuction with MA_OWNED to control the assertion checked by mtx_assert(). - Fix some of the KTR tracepoint strings to use %p when displaying the lock field of a mutex, which is a uintptr_t.
* Include the right headers to get the DDB #define and the db_active variable.jhb2000-11-153-0/+9
|
* - Replace some instances of sched_ithd with sched_swi in KTR tracepoints.jhb2000-11-151-2/+3
| | | | - Assert that Giant is not owned during the main loop of sithd_loop().
* Assert that Giant is not owned during the main loop of ithd_loop().jhb2000-11-152-0/+2
|
* Declare the 'witness_spin_check' properly as a per-CPU variable in thejhb2000-11-154-12/+1
| | | | non-SMP case.
* Don't perform witness checks in witness_enter() during a panic.jhb2000-11-153-3/+3
|
* Add the 'witness_spin_check' per-CPU variable.jhb2000-11-156-0/+6
|
* - Don't acquire/release Giant during an interrupt context for machinejhb2000-11-151-10/+1
| | | | | checks, clock interrupts, and device interrupts. - Assert that Giant is not owned during the main loop of ithd_loop().
* Make ktr_verbose a bit more useful:jhb2000-11-151-0/+5
| | | | | | - On SMP systems display the cpu number with each message - If ktr_verbose > 1, then include the filename and line number with each trace message
* Bug fix for revision 1.14 on the replacement of CIRCLEQ with TAILQ.mckusick2000-11-151-6/+4
| | | | Submitted by: Warner Losh <imp@village.org>
* Fix all the interrupt enabled/disabled assertions which were backwards.jhb2000-11-152-12/+12
|
* Don't perform an mi_switch() when we release Giant during cpu_exit(). Wejhb2000-11-154-4/+8
| | | | | | are about to call cpu_switch() anyways. Found by: witness
* In preparation for deprecating CIRCLEQ macros in favor of TAILQmckusick2000-11-151-35/+34
| | | | | | | macros which provide the same functionality and are a bit more efficient, convert use of CIRCLEQ's in netgraph PPP code to TAILQ's. Reviewed by: Archie Cobbs <archie@dellroad.org>
* vx no longer uses pci compat shims and this doesn't need a countimp2000-11-152-2/+2
|
* MFGENERIC: 1.291imp2000-11-151-0/+6
|
* Add pmtimer device, necessary for proper time keeping when apm orimp2000-11-152-0/+4
| | | | other power management devices are enabled.
* remove period from SEE ALSO.ben2000-11-151-1/+1
|
OpenPOWER on IntegriCloud