summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove the assertive KA_HELD and KA_UNHELD as long as they are dangerous,attilio2009-02-052-20/+1
| | | | and not really helpful.
* Don't bother null-checking the thread pointer before the prison checksjamie2009-02-051-27/+22
| | | | | | | | | in udp6_connect (td is already dereferenced elsewhere without such a check). This makes the conversion from a sockaddr to a sockaddr_in6 always happen, so convert once at the beginning of the function rather than twice in the middle. Approved by: bz (mentor)
* Add more KTR_VFS logging point in order to have a more effective tracing.attilio2009-02-052-23/+78
| | | | | Reviewed by: brueffer, kib Tested by: Gianni Trematerra <giovanni D trematerra A gmail D com>
* Call prison_if from rtm_get_jailed, instead of splitting it out intojamie2009-02-051-90/+63
| | | | | | | prison_check_ip4 and prison_check_ip6. As prison_if includes a jailed() check, remove that check before calling rtm_get_jailed. Approved by: bz (mentor)
* Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and ofjamie2009-02-052-18/+9
| | | | | | prison_local_ip6 in in6_pcbbind. Approved by: bz (mentor)
* Don't leave the console TTY constantly open.ed2009-02-054-67/+80
| | | | | | | | | | | | | | | | | When we leave the console TTY constantly open, we never reset the termios attributes. This causes output processing, echoing, etc. not to be reset to the proper values when going into single user mode after the system has booted. It also causes nl-to-crnl-conversion not to take place during shutdown, which causes a `staircase effect'. This patch adds a new TTY flag, TF_OPENED_CONS, which is set when the TTY is opened through /dev/console. Because the flags are only used by the kernel and the pstat(8) utility, I've decided to renumber the TTY flags. This shouldn't be an issue, because the TTY layer is not yet part of a stable release. Reported by: Mark Atkinson <atkin901 yahoo com> Tested by: sepotvin
* Don't allow creating a socket with a protocol family that the currentjamie2009-02-053-8/+44
| | | | | | | | | | jail doesn't support. This involves a new function prison_check_af, like prison_check_ip[46] but that checks only the family. With this change, most of the errors generated by jailed sockets shouldn't ever occur, at least until jails are changeable. Approved by: bz (mentor)
* Standardize the various prison_foo_ip[46] functions and prison_if tojamie2009-02-0514-211/+195
| | | | | | | | | | | | | | | return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor)
* Use the correct creds when reconnecting so that we have enough privilege todfr2009-02-051-2/+3
| | | | | | bind reserved ports (if necessary). Submitted by: Jaakko Heinonen <jh at saualaht dot fi>
* In some situations, mnt_lockref could go negative due to vfs_unbusy() beingtrasz2009-02-051-3/+5
| | | | | | | | | | | called without calling vfs_busy() first. This made umount(8) hang waiting for mnt_lockref to become zero, which would never happen. Reviewed by: kib Approved by: rwatson (mentor) Reported by: pho Found with: stress2 Sponsored by: FreeBSD Foundation
* pass in smp_processor_id to identify the cpu in usekmacy2009-02-051-1/+1
|
* adjust the way that idle happens so as to avoid missing timer interruptskmacy2009-02-051-64/+63
|
* Allow unprivileged users to run l2ping(8).emax2009-02-041-5/+0
| | | | MFC after: 1 month
* Fix bm_shutdown() KOBJ method to correspond to return int, as it should.nwhitehorn2009-02-041-2/+4
| | | | Found by: Andriy Gapon
* Clenup code a bit and do not call fork(2) before dameon(3) where not needed.emax2009-02-044-52/+12
| | | | MFC after: 1 month
* Correct signatures to match kobj function definitions.imp2009-02-043-22/+19
|
* Shutdown routine returns int.imp2009-02-042-3/+3
|
* detach doesn't return an unsinged int, but returns an int.imp2009-02-041-2/+2
|
* Fix shutdown routine to return 0 and change signature from void returnimp2009-02-044-4/+8
| | | | to int.
* Correct signature for the identify routine. The bad parameter wasn'timp2009-02-041-2/+2
| | | | used at all, so this is just a tidiness excersize.
* Remove local variable 'ddp' from DDP's attach and detach routines; theyrwatson2009-02-041-6/+2
| | | | | | | | were used only for assertions, and rather than ifdef'ing them INVARIANTS and using local variables, just directly access so_pcb. Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de> MFC after: 1 week
* Remove written-to but never read local variable 'offset' fromrwatson2009-02-041-2/+1
| | | | | | | soreceive_dgram(). Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de> MFC after: 1 week
* Eliminate the local variable 'ape' in audit_pipe_kqread(), as it's onlyrwatson2009-02-041-5/+0
| | | | | | | used for an assertion that we don't really need anymore. MFC after: 1 week Reported by: Christoph Mallon <christoph dot mallon at gmx dot de>
* Tweak the ia64 machine check handling code to not register new sysctl nodesjhb2009-02-042-26/+45
| | | | | | | | | while holding a spin mutex. Instead, it now shoves the machine check records onto a queue that is later drained to add sysctl nodes for each record. While a routine to drain the queue is present, it is not currently called. Reviewed by: marcel
* Check for NOAUTO on child interfaces (eg wlanX) so they can be created viathompsa2009-02-041-1/+3
| | | | rc.conf but not necessarily started.
* Get the right system makefiles for make distribution.phk2009-02-041-1/+2
|
* Remove slush space from clists.ed2009-02-042-77/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Right now we only have a very small amount of drivers that use clists, but we still allocate 50 cblocks as slush space, which allows drivers to temporarily overcommit their storage. Most of the drivers don't allow this anyway. I've performed the following changes: - We don't allocate any cblocks on startup. - I've removed the DDB command, because it has nothing useful to print now. You can obtain the amount of allocated blocks by running `vmstat -m | grep clist'. - I've removed cfreecount, which is now unused. - The old code first tries to allocate using M_NOWAIT, followed by M_WAITOK. This doesn't make any sense, so just remove this logic. It seems the drivers allow us to sleep anyway. We can even remove ccmax from clist_alloc_cblocks and c_cbmax from struct clist, but this breaks binary compatibility. This reduces the amount of allocated cblocks on my system from 54 to 4.
* When iterating through the list trying to find a router inbz2009-02-041-1/+3
| | | | | | | | | | | defrouter_select(), NULL the cached llentry after unlocking as we are no longer interested in it and with the second iteration would try to unlock it again resulting in panic: Lock (rw) lle not locked @ ... Reported by: Mark Atkinson <m.atkinson@f5.com> Tested by: Mark Atkinson <m.atkinson@f5.com> PR: kern/128247 (in follow-up, unrelated to original report)
* Erm... Report the buffer as being bounced even when it's the entire buffer,cognet2009-02-041-1/+1
| | | | | | | | | or we would end up invalidating the cache line for what we just copied... Reported by: thompsa Pointy at to: cognet MFC after: 3 days
* Update the actions previously attempted by the -D option to make themmckusick2009-02-046-76/+205
| | | | | | | | | | | | | | | | | | robust. With these changes fsck is now able to detect and reliably rebuild corrupted cylinder group maps. The -D option is no longer necessary as it has been replaced by a prompt asking whether the corrupted cylinder group should be rebuilt and doing so when requested. These actions are only offered and taken when running fsck in manual mode. Corrupted cylinder groups found during preen mode cause the fsck to fail. Add the -r option to free up excess unused inodes. Decreasing the number of preallocated inodes reduces the running time of future runs of fsck and frees up space that can allocated to files. The -r option is ignored when running in preen mode. Reviewed by: Xin LI <delphij@> Sponsored by: Rsync.net
* When crafting a media setting w/ an auto (non-fixed) rate mask out thesam2009-02-031-12/+14
| | | | | | | | | | turbo option in addition to the mode bits; otherwise if the current channel is a turbo mode channel we'll form an invalid media setting and the ifmedia_set operation in vap_attach will panic. While here use C99-style initialization for an array indexed by mode; this makes it consistent w/ other usage and avoids breakage if we should ever change the set of modes.
* Reflect adding_user.8 -> adding_user.7 renamegabor2009-02-031-0/+2
| | | | Reminded by: kib
* LOR fix - Lock only when calling the actual code thatrrs2009-02-031-2/+4
| | | | | | | is messing with the UDP tunnel. This means that if two users actually tried to change the tunnel port at the same time interesting things COULD result, but its probably very unlikely to happen :-)
* Remove NUMCDEVSW, which is unused since RELENG_5.ed2009-02-031-2/+0
| | | | Discussed with: kib
* Fix the functions to match prototypes. The K&R definitions differimp2009-02-033-3/+3
| | | | from the ANSI-C prototype due to the 'int promotion' rule.
* Slightly improve the design of the TTY buffer.ed2009-02-035-105/+119
| | | | | | | | | | | | | | | | | | | The TTY buffers used the standard <sys/queue.h> lists. Unfortunately they have a big shortcoming. If you want to have a double linked list, but no tail pointer, it's still not possible to obtain the previous element in the list. Inside the buffers we don't need them. This is why I switched to custom linked list macros. The macros will also keep track of the amount of items in the list. Because it doesn't use a sentinel, we can just initialize the queues with zero. In its simplest form (the output queue), we will only keep two references to blocks in the queue, namely the head of the list and the last block in use. All free blocks are stored behind the last block in use. I noticed there was a very subtle bug in the previous code: in a very uncommon corner case, it would uma_zfree() a block in the queue before calling memcpy() to extract the data from the block.
* Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just thejhb2009-02-031-29/+29
| | | | | | | constants used for the ppi(4) ioctls for bits in the control and status registers. Reviewed by: db
* add Roel's copyright as he did the initial versionsam2009-02-031-0/+1
|
* Add support for the StrataFlash on 2348 boards:sam2009-02-036-2/+21
| | | | | | | | | o add bus shim for cfi driver o add static mapping for CS0 (we map all 16M as the cfi driver doesn't support demand mapping) Note this needs some tweaking to work for 2358 boards which is why the CAMBRIA config is not touched.
* honor any interface width (e.g. setup by the bus shim) and don't probe;sam2009-02-032-5/+89
| | | | this is needed for the moment to workaround bus shim issues
* reorg ioctl code to simplify adding new requestssam2009-02-031-16/+21
|
* force atomic_cmpset_ptr types to match atomic_cmpset_32;sam2009-02-031-1/+2
| | | | | | | this matches what powerpc does Submitted by: stass MFC after: 2 weeks
* fix compilation w/ AH_DEBUGsam2009-02-032-2/+2
|
* - ANSIfy function definitionsdanger2009-02-0333-110/+41
| | | | | | - use nul when we are looking for a terminating character where appropriate Approved by: imp
* Delete fwohci_filt() as it is now unusedsbruno2009-02-031-1/+0
| | | | | Obtained from: Marius Strobl <marius@alchemy.franken.de> MFC after: 2 weeks
* Don't right-adjust the SMBus slave address for SSIF IPMI BMCs enumeratedjhb2009-02-031-1/+1
| | | | | via ACPI either. This is somewhat academic since we don't currently support such devices though.
* - Change ichsmb(4) to follow the format of all the other smbus controllersjhb2009-02-033-12/+16
| | | | | | | | | | | | | for slave addressing by using left-adjusted slave addresses (i.e. xxxxxxx0b). - Require the low bit of the slave address to always be zero in smb(4) to help catch broken applications. - Adjust some code in the IPMI driver to not convert the slave address for SSIF to a right-adjusted address. I (or possibly ambrisko@) added this in the past to (unknowingly) work around the bug in ichsmb(4). Submitted by: Andriy Gapon <avg of icyb.net.ua> (1,2) MFC after: 1 month
* - Keep the same sorting on usb_errstr_table as the enum.thompsa2009-02-032-43/+44
| | | | - Use c99 array initializers for usb_quirk_str so the indexing isnt critical.
* Partially revert r186559.obrien2009-02-031-1/+1
|
* Add missing string table for the usb quirk enum.thompsa2009-02-032-3/+28
| | | | | Pointy hat: me Submitted by: rrs
OpenPOWER on IntegriCloud