summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fix indent.ume2006-04-011-9/+9
|
* Chance protocol switch method pru_detach() so that it returns voidrwatson2006-04-0132-183/+114
| | | | | | | | | | | | | | | | | | | | | | | | | rather than an error. Detaches do not "fail", they other occur or the protocol flags SS_PROTOREF to take ownership of the socket. soclose() no longer looks at so_pcb to see if it's NULL, relying entirely on the protocol to decide whether it's time to free the socket or not using SS_PROTOREF. so_pcb is now entirely owned and managed by the protocol code. Likewise, no longer test so_pcb in other socket functions, such as soreceive(), which have no business digging into protocol internals. Protocol detach routines no longer try to free the socket on detach, this is performed in the socket code if the protocol permits it. In rts_detach(), no longer test for rp != NULL in detach, and likewise in other protocols that don't permit a NULL so_pcb, reduce the incidence of testing for it during detach. netinet and netinet6 are not fully updated to this change, which will be in an upcoming commit. In their current state they may leak memory or panic. MFC after: 3 months
* Annotate uses of fgetsock() with indications that they should relyrwatson2006-04-012-0/+12
| | | | | | | on their existing file descriptor references to sockets, rather than use fgetsock() to retrieve a direct socket reference. MFC after: 3 months
* Change protocol switch pru_abort() API so that it returns void ratherrwatson2006-04-0129-100/+124
| | | | | | | | | | | | | | than an int, as an error here is not meaningful. Modify soabort() to unconditionally free the socket on the return of pru_abort(), and modify most protocols to no longer conditionally free the socket, since the caller will do this. This commit likely leaves parts of netinet and netinet6 in a situation where they may panic or leak memory, as they have not are not fully updated by this commit. This will be corrected shortly in followup commits to these components. MFC after: 3 months
* Convert the SYNOPSIS section to look like the ones used in other driverbrueffer2006-04-016-0/+72
| | | | | | manpages, mention module support. MFC after: 3 days
* Add comment to accept1() that it should use getsock() instead of fgetsock()rwatson2006-04-011-0/+3
| | | | | | | to avoid additional mutex operations, and also to avoid use of soref/sorele which are now not preferred. MFC after: 3 months
* Mark fgetsock() and fputsock() as depcrecated: callers should rely onrwatson2006-04-011-2/+8
| | | | | | | | | | the file descriptor reference, rather than paying additional lock operations to acquire a socket reference from the file descriptor. This will also help to ensure that file descriptor based socket requests are not delivered to a socket after close. Most consumers have already been converted to this model. MFC after: 3 months
* Convert the SYNOPSIS section to look like the ones used in other driverbrueffer2006-04-013-5/+47
| | | | | | | | manpages, mention module support. Also add the crypto and cryptodev devices as the drivers are kind of useless without them. MFC after: 3 days
* Convert the SYNOPSIS section to look like the ones used in other driverbrueffer2006-04-011-4/+12
| | | | | | manpages. MFC after: 3 days
* Add a comment describing SS_PROTOREF in detail. This will eventually berwatson2006-04-011-0/+7
| | | | | | in socket(9). MFC after: 3 months
* Assert so->so_pcb is NULL in sodealloc() -- the protocol state should notrwatson2006-04-011-0/+2
| | | | | | | | be present at this point. We will eventually remove this assert because the socket layer should never look at so_pcb, but for now it's a useful debugging tool. MFC after: 3 months
* Add a somewhat sizable comment documenting the semantics of various kernelrwatson2006-04-011-0/+57
| | | | | | | | socket calls relating to the creation and destruction of sockets. This will eventually form the foundation of socket(9), but is currently in too much flux to do so. MFC after: 3 months
* Convert the SYNOPSIS section to look like the ones used in other driverbrueffer2006-04-011-6/+12
| | | | | | | manpages. Don't mention the include file, it's not important for the operation of this driver. MFC after: 3 days
* Add a standard boilerplate to the SYNOPSIS section that mentions howbrueffer2006-04-011-1/+13
| | | | | | to load a kernel module. MFC after: 3 days
* Mention the module in the synopsis.brueffer2006-04-012-2/+26
|
* Fix some of the previus changes 'better'.mjacob2006-04-015-842/+970
| | | | | | | | | | | | | | | | | | | | | | | There's something strange going on with async events. They seem to be be treated differently for different Fusion implementations. Some will really tell you when it's okay to free the request that started them. Some won't. Very disconcerting. This is particularily bad when the chip (FC in this case) tells you in the reply that it's not a continuation reply, which means you can free the request that its associated with. However, if you do that, I've found that additional async event replies come back for that message context after you freed it. Very Bad Things Happen. Put in a reply register debounce. Warn about out of range context indices. Use more MPILIB defines where possible. Replace bzero with memset. Add tons more KASSERTS. Do a *lot* more request free list auditting and serial number usages. Get rid of the warning about the short IOC Facts Reply. Go back to 16 bits of context index. Do a lot more target state auditting as well. Make a tag out of not only the ioindex but the request index as well and worry less about keeping a full serial number.
* Build the scc(4) module with EBus and SBus attachments for sparc64marcel2006-04-011-2/+8
| | | | only and build the scc(4) module with MacIO attachment for powerpc.
* Add the MacIO attachment for scc(4).marcel2006-04-011-0/+1
|
* Add a MacIO bus attachment. The Z8530 as present in the Mac needsmarcel2006-04-017-18/+101
| | | | | | | | a different register shift and is fed by a different clock than we use for UltraSPARC hardware. To deal with this, the regshft and rclk fields in the class structure are removed and bus frontends now pass the right regshft and rclk to the probe function where they're put in the BAS and passed in to subordinate drivers.
* Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,deischen2006-04-011-0/+4
| | | | | | | | this is used by some 3rd party applications when {e,f,g}cvt() are not found. POSIX defines the xcvt() funtions but says they are deprecated in favor or sprintf(). We'll import these functions from OpenBSD and remove __gdtoa() from the exported interfaces when libc version is bumped.
* - Busy the filesystem in nfs_statfs to prevent us from creating a newjeff2006-04-011-1/+7
| | | | | | | | | vnode after vflush() has succeeded. This would cause a dangling vnode panic at unmount time otherwise. Other filesystems may have this problem via their VFS_VGET() routines. Found by: kris Sponsored by: Isilon Systems, Inc.
* - Add an assert to vgone. It is illegal to call vgone without a referencejeff2006-03-311-3/+0
| | | | | | | to the vnode. Without a reference the vnode will never be vdestroy'd and the memory will never be reclaimed. Sponsored by: Isilon Systems, Inc.
* - When there are dangling vnodes at unmount print them before we panic.jeff2006-03-311-1/+6
| | | | Sponsored by: Isilon Systems, Inc.
* - Add a bogus vhold/vdrop around vgone() in devfs_revoke. Without thisjeff2006-03-311-0/+3
| | | | | the vnode is never recycled. It is bogus because the reference really should be associated with the devfs dirent.
* Add kbdmux(4) to GENERIC on amd64emax2006-03-311-0/+2
| | | | | Requested by: scottl Tested by: scottl
* Fix cut-n-paste braino in previous commit: s/puc/scc/gmarcel2006-03-311-1/+1
| | | | Pointy hat: marcel@
* Remove the USB keyboard hack now that KBDMUX is enabled by default. Allowscottl2006-03-311-11/+1
| | | | it to be disabled if Safe Mode is selected.
* Add kbdmux(4) to GENERICemax2006-03-311-0/+2
| | | | Requested by: scottl
* Add a DRIVER_MODULE declaration for fhc(4) as this attachement ismarcel2006-03-311-0/+1
| | | | | | also used for the FHC bus. Pointed out by: marius@
* Sort bootstrap-tools entries.ru2006-03-311-5/+5
|
* Amazing.. two screwups in one commit.julian2006-03-311-1/+2
| | | | | I'm piling on thise pointy hats on top of each other. At least they nest..
* I can't believe that no-one noticed that I broke ipfw table deljulian2006-03-311-1/+2
| | | | | for over a month! put {} around if clause with multiple statements
* MEGA Fixes / Cleanupariff2006-03-311-300/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------------------- - Seal the fate of long standing memory leak (4 years, 7 months) during pcm_unregister(). While destroying cdevs, scan / detect possible children and free its SLIST placeholder properly. - Optimize channel allocation / numbering even further. Do brute cyclic checking only if the channel numbering screwed. - Mega vchan create/destroy cleanup: o Implement pcm_setvchans() so everybody can use it freely instead of implementing their own, be it through sysctl or channel auto allocation. o Increase vchan creation/destruction resiliency: + it's possible to increase/decrease total vchans even during busy playback/recording. Busy channel will be left alone, untouched. Abusive test sample: # play whatever... # while : ; do sysctl hw.snd.pcm0.vchans=1 sysctl hw.snd.pcm0.vchans=10 sysctl hw.snd.pcm0.vchans=100 sysctl hw.snd.pcm0.vchans=200 done # Play something else, leave above loop running frantically. + Seal another 4 years old bug where it is possible to destroy (virtual) channel even when its cdevs being referenced by other process. The "First Come First Served" nature of dsp_clone() is the main culprit of this issue, and usually manifest itself as dangling channel <-> process association. Ensure that all of its cdevs are free from being referenced before destroying it (through ORPHAN_CDEVT() macross). All these fixes (including previous fixes) will be MFCed, later.
* - Increase snddev refcount earlier while accessing through sysctl interfaceariff2006-03-311-27/+34
| | | | | | | to avoid possible device unregister race (impossible to reproduce, yet possible). - Extra sanity check to ensure proper parent channel is being selected. - Reset parent channel once all of its children gone.
* Make the ATAPI sense data accessible when using the ioctl interfacesos2006-03-318-93/+107
| | | | MFC candidate.
* - Release the references acquired by VOP_GETWRITEMOUNT and vfs_getvfs().jeff2006-03-317-31/+62
| | | | | | Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Hold a reference from the time vfs_busy starts until vfs_unbusy isjeff2006-03-311-3/+9
| | | | | | | | | | | called. - vfs_getvfs has to return a reference to prevent the returned mountpoint from changing identities. - Release references acquired via vfs_getvfs. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - GETWRITEMOUNT now returns a referenced mountpoint to prevent itsjeff2006-03-311-1/+15
| | | | | | | | identity from changing. This is possible now that mounts are not freed. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Allocate mounts from a uma zone that uses UMA_ZONE_NOFREE to preventjeff2006-03-311-8/+32
| | | | | | | | | | | | | | | mount memory from being reclaimed. This resolves a number of race conditions described in vfs_default.c and introduced with the VFS_LOCK_GIANT macros. - Let the mtx and lock remain valid after the mount structure has been freed by using init and fini calls. Technically fini will never be called but is included for completeness. - Consistently use lockmgr directly rather than lockmgr to lock and vfs_unbusy to unlock. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - Define mnt_startzero and mnt_endzero as a range that excludes mnt_mtxjeff2006-03-311-2/+4
| | | | | | | | | and mnt_lock so that the mountpoint can be explicitly zeroed on creation. Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* - LK_RETRY means nothing when passed to VOP_LOCK. Call vn_lock instead.jeff2006-03-311-1/+2
| | | | | | | | | | - 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.
* - Add the B_NEEDSGIANT flag which is only set if the vnode that owns a bufjeff2006-03-313-17/+39
| | | | | | | | | requires Giant. It is set in bgetvp and cleared in brelvp. - Create QUEUE_DIRTY_GIANT for dirty buffers that require giant. - In the buf daemon, only grab giant when processing QUEUE_DIRTY_GIANT and only if we think there are buffers in that queue. Sponsored by: Isilon Systems, Inc.
* Build uart(4) on PowerPC.marcel2006-03-311-2/+1
|
* Allow uart(4) to be built on PowerPC.marcel2006-03-312-0/+55
|
* Add a dummy implementation of bus_space_map().marcel2006-03-311-3/+9
|
* remove these vestiges of gdbserver.. It hasn't built in a long time, andjmg2006-03-312-365/+0
| | | | | now really belongs in gdb, not binutils.. Plus, these don't resemble what the new gdbserver looks like.
* fixup error handling in taskqueue_start_threads: check for kthread_createsam2006-03-301-11/+20
| | | | | | | | failing, print a message when we fail for some reason as most callers do not check the return value (e.g. 'cuz they're called from SYSINIT) Reviewed by: scottl MFC after: 1 week
* Include the sbus attachment of scc(1) when either fhc(4) or sbus(4)marcel2006-03-301-1/+1
| | | | is configured.
* Currently, if writing out a log entry fails, we unlink that log entry from ourcsjp2006-03-301-5/+12
| | | | | | | | | | | | internal list of logfiles. So if writev(2) fails for potentially transient errors like ENOSPC, syslogd requires a restart, even if the filesystem has purged. This change allows syslogd to ignore ENOSPC space errors, so that when the filesystem is cleaned up, syslogd will automatically start logging again without requiring the reset. This makes syslogd(8) a bit more reliable. MFC after: 1 week
* Optimize runtime performance, primary using the following techniques:jasone2006-03-301-285/+294
| | | | | | | | | | | | | | | * Avoid choosing an arena until it's certain that an arena is needed for allocation. * Convert division/multiplication to bitshifting where possible. * Avoid accessing TLS variables in single-threaded code. * Reduce the amount of pointer dereferencing. * Move lock acquisition in critical paths to only protect the the code that requires synchronization, and completely remove locking where possible.
OpenPOWER on IntegriCloud