summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce the vm.boot_pages tunable and sysctl, which controls the numberdes2005-08-121-3/+8
| | | | | | of pages reserved to bootstrap the kernel memory allocator. MFC after: 2 weeks
* Eliminate an unnecessary bcopy().des2005-08-121-15/+15
|
* Axe ppp_for_tty(). Use tty->t_lsc pointer to store sc. Thisglebius2005-08-123-24/+7
| | | | | | | | also eliminates recursive use of ppp_softc_list_mtx. PR: kern/84686 Reviewed by: phk MFC after: 1 week
* Add NATM_LOCK() and NATM_UNLOCK() in places where npcb_add() androdrigc2005-08-121-0/+9
| | | | | | | npcb_free() are called, in order to eliminate witness panics. This was overlooked in removal of GIANT from ATM. Reviewed by: rwatson
* Provide more complete "How to add a new file system to glabel." list.pjd2005-08-121-3/+7
| | | | MFC after: 1 week
* Add code for Ext2FS and ReiserFS labels recognition.pjd2005-08-126-0/+210
| | | | | | Submitted by: Stanislav Sedov <stas@310.ru> PR: kern/84638 MFC after: 1 week
* Avoid creating directories in devfs by changing all '/' in labels to '_'.pjd2005-08-121-0/+8
| | | | | Idea from: Stanislav Sedov <stas@310.ru> MFC after: 3 days
* Eliminate unneeded diagnostic code.alc2005-08-112-14/+0
| | | | | Eliminate an unused #include. (Kernel stack allocation and deallocation long ago migrated to the machine-independent code.)
* The "lowest" sysctl setting makes more sense as the lowest one to use, sonjl2005-08-111-2/+2
| | | | | | discard all levels less than this setting, not less than/equal to. MFC after: 1 day
* Eliminate unneeded diagnostic code.alc2005-08-112-14/+0
| | | | Reviewed by: tegge
* Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero,njl2005-08-111-3/+2
| | | | | | just skip summing it if it's unknown. MFC after: 1 day
* Embellish comment.obrien2005-08-111-1/+1
| | | | Submitted by: Rostislav Krasny <rosti.bsd@gmail.com>
* GELI doesn't need cryptodev.pjd2005-08-111-1/+0
| | | | MFC after: 3 days
* Fix stand-alone (or MODULES_WITH_WORLD=1) build ofyar2005-08-111-1/+7
| | | | | | | | | the procfs module by creating opt_compat.h with appropriate compatibility options: COMPAT_43 on all arch's and COMPAT_IA32 in addition on amd64. Pointy hat to: peter MFC after: 3 days
* o To prevent a race between RTM_DELETE message andglebius2005-08-111-2/+4
| | | | | | | arptimer() deleting stale entry, we need to lock rtentry before unlocking radix head. Reviewed by: sam
* o Fix a race between three threads: output path,glebius2005-08-111-155/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incoming ARP packet and route request adding/removing ARP entries. The root of the problem is that struct llinfo_arp was accessed without any locks. To close race we will use locking provided by rtentry, that references this llinfo_arp: - Make arplookup() return a locked rtentry. - In arpresolve() hold the lock provided by rt_check()/arplookup() until the end of function, covering all accesses to the rtentry itself and llinfo_arp it refers to. - In in_arpinput() do not drop lock provided by arplookup() during first part of the function. - Simplify logic in the first part of in_arpinput(), removing one level of indentation. - In the second part of in_arpinput() hold rtentry lock while copying address. o Fix a condition when route entry is destroyed, while another thread is contested on its lock: - When storing a pointer to rtentry in llinfo_arp list, always add a reference to this rtentry, to prevent rtentry being destroyed via RTM_DELETE request. - Remove this reference when removing entry from llinfo_arp list. o Further cleanup of arptimer(): - Inline arptfree() into arptimer(). - Use official queue(3) way to pass LIST. - Hold rtentry lock while reading its structure. - Do not check that sdl_family is AF_LINK, but assert this. Reviewed by: sam Stress test: http://www.holm.cc/stress/log/cons141.html Stress test: http://people.freebsd.org/~pho/stress/log/cons144.html
* o Make rt_check() function more strict:glebius2005-08-115-55/+67
| | | | | | | | | | - rt0 passed to rt_check() must not be NULL, assert this. - rt returned by rt_check() must be valid locked rtentry, if no error occured. o Modify callers, so that they never pass NULL rt0 to rt_check(). Reviewed by: sam, ume (nd6.c)
* create sysctl tree dynamically. it is required to shareume2005-08-111-10/+21
| | | | | | net.inet6.ip6.fw with upcomming ipfw2 improvement for IPv6. Requested by: bz
* Decouple the unrefing of a page table page from the removal of a pv entry.alc2005-08-112-48/+30
| | | | | | | In other words, change pmap_remove_entry() such that it no longer unrefs the page table page. Now, it only removes the pv entry. Reviewed by: tegge
* Use device_printf() and if_printf() and remove dc_unit from softc.jhb2005-08-104-72/+62
|
* Use if_printf() and device_printf() and axe sf_unit from the softc as ajhb2005-08-104-42/+32
| | | | result.
* - Remove pre-new-bus code under #if 0 and some other rotted code underjhb2005-08-101-55/+2
| | | | | | | | | #if 0. - Use pci_enable_busmaster() to enable busmastering instead of frobbing the command register directly. - Don't check to see if memory or I/O can be enabled by writing to the command register. The PCI bus driver's bus_alloc_resource() method already checks this and will fail if it can't enable the bit.
* - Use if_printf() and device_printf() instead of outputting my%d:jhb2005-08-102-68/+47
| | | | | | | | everywhere. This means that my_unit is no longer used as well. The watchdog routine now also prints 'my0: ...' rather than 'm0x0: ...'. - Don't bzero the softc and don't try to free it in detach or if attach fails. - A whitespace fix.
* - Use callout_init_mtx() to close races between hme_stop() and hme_tick().jhb2005-08-101-57/+22
| | | | | | | | | | | - Use the driver lock instead of Giant in a bus dma callback. - Clear IFF_DRV_(RUNNING|OACTIVE) in hme_stop() instead of just clearing RUNNING in hme_ioctl() to be more like other ethernet drivers. - Lock the driver lock around mii operations. - Remove spls. - Cleanup locking in hme_ioctl(). MFC after: 1 week
* Don't use ic_curmode to decide when to do 11g station accounting,sam2005-08-102-5/+6
| | | | | | | | | | use the station channel properties. Fixes assert failure/bogus operation when an ap is operating in 11a and has associated stations then switches to 11g. Noticed by: Michal Mertl Reviewed by: avatar MFC after: 2 weeks
* removed RFC1885-related code. it was obsoleted by RFC2463, and theume2005-08-101-52/+0
| | | | | | | code was #ifdef'ed out for a long time. Submitted by: suz Obtained from: KAME
* Clarify/fix handling of the current channel:sam2005-08-1014-243/+339
| | | | | | | | | | | | | | | | | | | o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
* Do not drop the vnode interlock if vdropl is called on already doomed vnode.kan2005-08-101-3/+1
| | | | | | vdropl callers expect it to return with interlock still being held. MFC after: 2 days
* supports stealth forwarding in IPv6, as well as in IPv4suz2005-08-104-1/+22
| | | | | PR: kern/54625 MFC after: 1 week
* Remove public declarations of variables that were forgotten when they wereobrien2005-08-108-11/+0
| | | | made static.
* Remove the need to forward declare statics by moving them around.obrien2005-08-102-72/+67
|
* Match IPv6 and use a static struct pr_usrreqs nousrreqs.obrien2005-08-102-3/+3
|
* Style nit.obrien2005-08-101-1/+1
|
* Use the ISO standard function variable vs. a GCC'ism.obrien2005-08-106-18/+18
|
* fixed a kernel crash at the start-up time of an IPv6 multicast daemons osuz2005-08-101-0/+1
| | | | | | (e.g. pim6dd, pim6sd) MFC after: 3 days
* Style cleanup.obrien2005-08-102-28/+15
|
* Fix FBSDid style nit.obrien2005-08-101-1/+0
|
* Add proper copyright attribution.obrien2005-08-101-0/+1
|
* Don't allow pagedaemon to skip pages while scanning PQ_ACTIVE or PQ_INACTIVEtegge2005-08-102-5/+75
| | | | | | | | | | | | | | | | | | | due to the vm object being locked. When a process writes large amounts of data to a file, the vm object associated with that file can contain most of the physical pages on the machine. If the process is preempted while holding the lock on the vm object, pagedaemon would be able to move very few pages from PQ_INACTIVE to PQ_CACHE or from PQ_ACTIVE to PQ_INACTIVE, resulting in unlimited cleaning of dirty pages belonging to other vm objects. Temporarily unlock the page queues lock while locking vm objects to avoid lock order violation. Detect and handle relevant page queue changes. This change depends on both the lock portion of struct vm_object and normal struct vm_page being type stable. Reviewed by: alc
* Call tulip_start() rather than tulip_ifstart() from the interrupt handlerjhb2005-08-092-2/+2
| | | | | | | to avoid recursing on the driver lock. Not sure why my test box didn't catch this earlier. MFC after: 3 days
* There's no reason to check the valence. This allows ciss to workps2005-08-092-8/+0
| | | | on the P600.
* Add helper function ip_findmoptions(), which accepts an inpcb, and attemptsrwatson2005-08-091-33/+58
| | | | | | | | | | | | | | | | | | | | | to atomically return either an existing set of IP multicast options for the PCB, or a newlly allocated set with default values. The inpcb is returned locked. This function may sleep. Call ip_moptions() to acquire a reference to a PCB's socket options, and perform the update of the options while holding the PCB lock. Release the lock before returning. Remove garbage collection of multicast options when values return to the default, as this complicates locking substantially. Most applications allocate a socket either to be multicast, or not, and don't tend to keep around sockets that have previously been used for multicast, then used for unicast. This closes a number of race conditions involving multiple threads or processes modifying the IP multicast state of a socket simultaenously. MFC after: 7 days
* Add an order between UDP inpcb locks and the IPv4 multicast addressrwatson2005-08-091-1/+2
| | | | | | | list lock, as there has been a report that an alternative lock order is getting introduced. This should help ferret it out. Reported by: Ed Maste <emaste at phaedrus dot sandvine dot ca>
* For each interface flag, indicate whether or not it is owned by therwatson2005-08-091-22/+28
| | | | | | | | | | | device driver, owned by the network stack, or initialized by the device driver before attach and read-only from then on. Not all device drivers and network stack components currently follow these rules, especially with respect to IFF_UP, and a few exceptions with IFF_ALLMULTI. MFC after: 7 days
* corrected the fourth argument to ni6_addrs().ume2005-08-091-7/+4
|
* Wrap the new world order in __FreeBSD__ to ease future imports.mlaier2005-08-092-0/+14
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-09142-1088/+1255
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Rename IFF_RUNNING to IFF_DRV_RUNNING, IFF_OACTIVE to IFF_DRV_OACTIVE,rwatson2005-08-094-11/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and move both flags from ifnet.if_flags to ifnet.if_drv_flags, making and documenting the locking of these flags the responsibility of the device driver, not the network stack. The flags for these two fields will be mutually exclusive so that they can be exposed to user space as though they were stored in the same variable. Provide #defines to provide the old names #ifndef _KERNEL, so that user applications (such as ifconfig) can use the old flag names. Using the old names in a device driver will result in a compile error in order to help device driver writers adopt the new model. When exposing the interface flags to user space, via interface ioctls or routing sockets, or the two fields together. Since the driver flags cannot currently be set for user space, no new logic is currently required to handle this case. Add some assertions that general purpose network stack routines, such as if_setflags(), are not improperly used on driver-owned flags. With this change, a large number of very minor network stack races are closed, subject to correct device driver locking. Most were likely never triggered. Driver sweep to follow; many thanks to pjd and bz for the line-by-line review they gave this patch. Reviewed by: pjd, bz MFC after: 7 days
* In preparation for fixing races in ARP (and probably in otherglebius2005-08-096-3/+9
| | | | L2/L3 mappings) make rt_check() return a locked rtentry.
* - Use 'error' variable to store error value, instead of 'i'.glebius2005-08-091-9/+6
| | | | | | | | - Push 'i' into the only block where it is used. - Remove redundant check for rt being NULL. If rt_check() hasn't returned an error, then rt is valid. Reviewed by: gnn
OpenPOWER on IntegriCloud