summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* In the current world order, solisten() implements the state transition ofrwatson2005-02-2111-60/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a socket from a regular socket to a listening socket able to accept new connections. As part of this state transition, solisten() calls into the protocol to update protocol-layer state. There were several bugs in this implementation that could result in a race wherein a TCP SYN received in the interval between the protocol state transition and the shortly following socket layer transition would result in a panic in the TCP code, as the socket would be in the TCPS_LISTEN state, but the socket would not have the SO_ACCEPTCONN flag set. This change does the following: - Pushes the socket state transition from the socket layer solisten() to to socket "library" routines called from the protocol. This permits the socket routines to be called while holding the protocol mutexes, preventing a race exposing the incomplete socket state transition to TCP after the TCP state transition has completed. The check for a socket layer state transition is performed by solisten_proto_check(), and the actual transition is performed by solisten_proto(). - Holds the socket lock for the duration of the socket state test and set, and over the protocol layer state transition, which is now possible as the socket lock is acquired by the protocol layer, rather than vice versa. This prevents additional state related races in the socket layer. This permits the dual transition of socket layer and protocol layer state to occur while holding locks for both layers, making the two changes atomic with respect to one another. Similar changes are likely require elsewhere in the socket/protocol code. Reported by: Peter Holm <peter@holm.cc> Review and fixes from: emax, Antoine Brodin <antoine.brodin@laposte.net> Philosophical head nod: gnn
* Bump __FreeBSD_version for vswprintf(3) fix. Some ports depend on it.fjoe2005-02-211-1/+1
|
* Only send packet to bpf if we are committed to send it. Previously it wasmlaier2005-02-211-6/+10
| | | | | | | | | possible that the same packet would show up multiple times. This poses some constraints on the TBD locking for snc(4) (see comment). Obtained from: DragonFlyBSD Submitted by: Joerg Sonnenberger Reviewed by: rwatson
* Fix a terrible braino in pfi_maybe_destroy() and unbreak "$pfctl -Fall" withmlaier2005-02-211-2/+5
| | | | | | | | | renamed interfaces. PR: kern/77645 Reported by: Harald Schmalzbauer <harryNOschmalzbauerSPAMde> Reviewed by: yongari MFC after: 3 days
* Don't use the static CALLOUT_INITIALIZER for __FreeBSD_version >= 600000. Itmlaier2005-02-212-1/+9
| | | | | | | | | | | was a bad idea, but since it is done like this in the vendor source we keep it around for older versions. As a safe guard against future misuse we don't even define CALLOUT_INITIALIZER anymore. This fixes ALTQ after callout_init_mtx() and takes altq_var.h off the vendor branch. Submitted by: Divacky Roman <xdivac02NOstud.fit.vutbrSPAMcz> (w/ changes)
* When aborting a UNIX domain socket bind() because VOP_CREATE() failed,rwatson2005-02-211-1/+3
| | | | | | make sure to call vn_finished_write(mp) before returning. MFC after: 3 days
* Minor style(9)isms.imp2005-02-211-40/+32
|
* - Remove dead code.scottl2005-02-211-3/+2
| | | | | | - Protect against negative values as array indexes. Submitted by: Coverity Prevent analysis tool
* Check for BIOS version 3.0 as well as 3.1.scottl2005-02-211-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Reference a pointer correctly when copying to it's location.scottl2005-02-211-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Check the correct periph pointer after search for it.scottl2005-02-201-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Protect against trying to free a non-existant peripheral.scottl2005-02-201-0/+4
| | | | | Submitted by: Coverity Prevent analysis tool MFC After: 3 days
* Don't attach ichss if est is present. On systems that seem to support both,njl2005-02-201-2/+6
| | | | the multi-setting EST is preferable.
* style(9)-ize function headers, remove use of 'register'.rwatson2005-02-201-59/+30
| | | | MFC after: 3 days
* Remove VFS_START(). Its original purpose involved the mfs filesystem,das2005-02-204-21/+1
| | | | | | | which is long gone. Discussed with: mckusick Reviewed by: phk
* Replace the workaround for a deadlock bug in Coda with a differentdas2005-02-204-32/+8
| | | | workaround that does not rely on vfs_start().
* MFp4: get the code that set the pc correctly to work, remove a few IQ31244cognet2005-02-202-21/+22
| | | | | | | specific mappings from locore.S, re-organize iq31244_machdep.c to work with the new locore.S Spotted out by: jmg
* Be more verbose on errors with CIS reading. This should be a noop, butimp2005-02-201-4/+9
| | | | | appears to fix the ath problem that had been reported. I don't see how it can, so there's likely some other hidden bug.
* style(9) nitimp2005-02-201-2/+2
|
* Hook EST up to the build.njl2005-02-202-1/+7
|
* Add the Enhanced SpeedStep driver (EST). Currently, this driver only worksnjl2005-02-201-0/+785
| | | | | | | | | | on the previous generation of Pentium-M processors (Banias). Support for Dothan and later processors involves working with acpi_perf(4) to extract information about supported states. This driver should work on MP systems including HTT. It is experimental and may have a few bugs but has been tested to not crash at least. Thanks to Colin Percival for his initial work on this driver.
* In unp_attach(), allow uma_zalloc to zero the new unpcb rather thanrwatson2005-02-201-3/+2
| | | | | | | | explicitly using bzero(). Update copyright. MFC after: 3 days
* Fix merging botch I made in last version.imp2005-02-201-1/+0
|
* Perliminary support for Fujitsu SCSI LAN combo card. At least for theimp2005-02-201-1/+1
| | | | | LAN side of things. It appears that all that's necessary is to relax the check on the DLCR2 register in the probe.
* Back out part of 1.23. This was a work in progress to support theimp2005-02-201-13/+5
| | | | Fujitsu LAN SCSI card's ethernet side.
* Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. Itimp2005-02-205-350/+22
| | | | is only used by the fe driver, and isn't MD.
* Minor optimizations to compile out bits that aren't necessary whenimp2005-02-202-5/+27
| | | | | | certain options aren't enabled. Submitted by: Chiharu Shibata-san (chi at bd mbn or jp)
* Minor style(9) tweaks.imp2005-02-201-7/+4
|
* Correct typo in comment.imp2005-02-201-1/+1
| | | | Submitted by: Chiharu Shibata-san (chi at bd mbn or jp)
* Prefer NULL to returning 0 cast to a pointer type.rwatson2005-02-202-6/+6
| | | | MFC after: 3 days
* In soreceive(), when considering delivery to a socket in SS_ISCONFIRMING,rwatson2005-02-201-1/+2
| | | | | | | | only call the protocol's pru_rcvd() if the protocol has the flag PR_WANTRCVD set. This brings that instance of pru_rcvd() into line with the rest, which do check the flag. MFC after: 3 days
* The recomputation of file system summary at mount time can be adelphij2005-02-203-5/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | very slow process, especially for large file systems that is just recovered from a crash. Since the summary is already re-sync'ed every 30 second, we will not lag behind too much after a crash. With this consideration in mind, it is more reasonable to transfer the responsibility to background fsck, to reduce the delay after a crash. Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to control this behavior. When set to nonzero, we will get the "old" behavior, that the summary is computed immediately at mount time. Add five new sysctl variables to adjust ndir, nbfree, nifree, nffree and numclusters respectively. Teach fsck_ffs about these API, however, intentionally not to check the existence, since kernels without these sysctls must have recomputed the summary and hence no adjustments are necessary. This change has eliminated the usual tens of minutes of delay of mounting large dirty volumes. Reviewed by: mckusick MFC After: 1 week
* Move assignment of UNIX domain socket pcb during unp_attach() outsiderwatson2005-02-201-1/+1
| | | | | | | of the global UNIX domain socket mutex: no protection is needed that early in the setup of the UNIX domain socket and socket structures. MFC after: 3 days
* Add a note that all four HME chips on a SUNW,qfe card share the same PROM,marius2005-02-201-1/+2
| | | | | | making it a bit more clear why we can read four NAs from the VPD. MFC after: 1 day
* Removing the #endif as well sounds like a good idea.cognet2005-02-201-1/+0
|
* In cpufunc_control, uncomment the code responsible for returning the oldcognet2005-02-201-1/+0
| | | | state of the control register.
* Add the "freq_settings" sysctl to each device that registers with cpufreqnjl2005-02-201-0/+41
| | | | so their individual settings can be seen separately for debugging.
* Use a common multi-inclusion protection, and add such aru2005-02-196-18/+28
| | | | protection to alpha/include/exec.h.
* Reimplement recursion protection, checking whether current thread holdsglebius2005-02-191-0/+6
| | | | | | sockbuf mutex. Reviewed by: rwatson
* Bump __FreeBSD_version for the Intel C/C++ compiler GCC-compatibilitymarius2005-02-191-1/+1
| | | | | fixes in src/include/stdbool.h rev. 1.7 and src/sys/i386/include/_types.h rev. 1.10, required by ports/lang/icc.
* Together with the changes to compile kernels with the Intel C/C++ compilermarius2005-02-191-1/+1
| | | | | | | | | | preliminary support for using the GCC-compatibility of ICC was committed but couldn't be tested at that time due to problems with ICC itself. Since ICC 8.1 it's possible to use its GCC-compatibility under FreeBSD and it turned out that a typedef for __gnuc_va_list is required in that case. Revert the part of rev. 1.8 which #ifdef'ed out __gnuc_va_list for ICC. MFC after: 1 week
* Try to unbreak the vnode locking around vop_reclaim() (based mostly onphk2005-02-197-39/+40
| | | | | | | | | patch from kan@). Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on close. This is not yet a generally safe function, but for this very specific use it is safe. This solves the problem with buffers not being flushed by unmount or after failed mount attempts.
* When clearing a fragment, it's possible that the length is zero.delphij2005-02-191-1/+1
| | | | | Reviewed by: mckusick MFC After: 1 week
* Add a new field to struct cf_setting for special values. These are driver-njl2005-02-192-1/+8
| | | | | specific values that other components may want to use. Add support to acpi_perf(4) to export the control and status values via this field.
* Don't restart a timeout wait in kern_sigtimedwait, also allow itdavidxu2005-02-191-11/+27
| | | | to wait longer than a single integer can represent.
* Fix for a potential NFS client race where shared data is updated fromps2005-02-181-0/+4
| | | | | | base context as well as the socket callback. Submitted by: Mohan Srinivasan
* Allocate the M_VLANTAG m_pkthdr flag, and use it to indicate thatru2005-02-184-8/+12
| | | | | | | | | | | | | | | | a packet has VLAN mbuf tag attached. This is faster to check than m_tag_locate(), and allows us to use the tags in non-vlan(4) VLAN producers. The first argument to VLAN_OUTPUT_TAG() is now unused but retained for backward compatibility. While here, embellish a fix in rev. 1.174 of if_ethersubr.c -- it now checks for packets with VLAN (mbuf) tags, and it should now be possible to bridge(4) on vlan(4)'s whose parent interfaces support VLAN decapsulation in hardware. Reviewed by: sam
* Swap the arguments for CP so we copy the correct source andps2005-02-181-4/+4
| | | | destination.
* Remove now unused 'int s' from spl().rwatson2005-02-181-1/+1
| | | | MFC after: 3 days
* De-spl kern_connect().rwatson2005-02-181-2/+0
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud