summaryrefslogtreecommitdiff
path: root/sys/kern
AgeCommit message (Collapse)Author
2007-09-26provide m_inithdr(), which takes an mbuf and gives an initialized M_PKTHDRHenning Brauer
mbuf back. for fixing PR5563 in a few, tested janjaap@stack.nl, ok claudio
2007-09-19instead of relying on mbuf.h to include pool.h and declareBret Lambert
mclpool as an extern, do so explicitly ok henning@ claudio@
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
2007-09-15replace ctob and btoc with ptoa and atop respectivelyMartin Reindl
help and ok miod@ thib@
2007-09-10Introduce a md pmap hook, pmap_remove_holes(), which is supposed to markMiod Vallat
the holes a MMU may have from a given vm_map. This will be automagically invoked for newly created vmspaces. On platforms with MMU holes (e.g. sun4, sun4c and vax), this prevents mmap(2) hints which would end up being in the hole to be accepted as valid, causing unexpected signals when the process tries to access the hole (since pmap can not fill the hole anyway). Unfortunately, the logic mmap() uses to pick a valid address for anonymous mappings needs work, as it will only try to find an address higher than the hint, which causes all mmap() with a hint in the hole to fail on vax. This will be improved later.
2007-09-08Sync description of lookup() a bit more to reality.Hans-Joerg Hoexer
ok thib@
2007-09-07Use M_ZERO in a few more places to shave bytes from the kernel.Artur Grabowski
eyeballed and ok dlg@
2007-09-07Add the long requested M_ZERO flag to malloc(9).Artur Grabowski
But the reason for this isn't some kind of "we can make it use the pre-zeroed pages and zero the freelist in the idle loop and OMG I can has optimisatiuns" which would require tons of infrastructure and make everything slower. The reason is that it shrinks other code. And that's good. dlg@ ok, henning@ ok (before he read the diff)
2007-09-03unsupported ioctl's should be returned with ENOTTYThordur I. Bjornsson
not -1; ok miod@
2007-09-01replace the machine dependant bytes-to-clicks macro by the MI ptoa()Martin Reindl
version for i386 more architectures and ctob() replacement is being worked on prodded by and ok miod
2007-09-01Remove support for ddb-only %r, %z, and the ddb-specific handling of %n fromMiod Vallat
the kernel printf. This will allow support for the real %z in the near future.
2007-08-30Fix lock ordering problems when updating mount points, in someThordur I. Bjornsson
cases we could end up releasing an unlocked lock. fixes pr's 5534 and 5564, confirmed by submitters. thanks!. ok art@
2007-08-16I don't really know what I was thinking when I wrote this. Not only does theArtur Grabowski
"array" index start at 1, the code also abused index 0 to detect that we were doing a KERN_POOL_NPOOLS. Just look at *name == KERN_POOL_NPOOLS instead of using index == 0 for that. deraadt@ ok
2007-08-09be more consistent in memcpy usage; no md5 change in .o; ok deraadt@Constantine A. Murenin
2007-08-07Correctly deal with EOF on pipe wrt kqueue. Based on a fix presentTodd C. Miller
in FreeBSD and NetBSD. OK art@ beck@
2007-08-07fix the "double-path" errors seen with getcwd by saving the orignalThordur I. Bjornsson
buffer position in vfs_getcwd_getcache() and restoring it on error. Use u_int32_t for the componentname hash, use the same type in the diagnostic code in relookup() to prevent unsigned vs signed errors. help, testing & ok kurt@ ok millert@, art@
2007-08-07 A few changes to deal with multi-user performance issues seen. thisBob Beck
brings us back roughly to 4.1 level performance, although this is still far from optimal as we have seen in a number of cases. This change 1) puts a lower bound on buffer cache queues to prevent starvation 2) fixes the code which looks for a buffer to recycle 3) reduces the number of vnodes back to 4.1 levels to avoid complex performance issues better addressed after 4.2 ok art@ deraadt@, tested by many
2007-08-06Fix error path in sys_fhopen() if VOP_ADVLOCK fails. Spotted by aaron@Todd C. Miller
2007-08-05Move some printf's about disklabel disksize and RAW_PART size/offsetKenneth R Westerback
under #ifdef DEBUG. Adjust the verbiage. Some minor tweaks while in the area. ok deraadt@
2007-08-05Use d_partitions[DISKPART(dev)] rather that d_partitions +Kenneth R Westerback
DISKPART(dev). Thus making the idiom the same everywhere. pointed out by deraadt@
2007-08-04Allow ddb>ps to print the full name of the wait state. Things likeChris Kuethe
"flt_noram1" would get truncated otherwise. ok deraadt
2007-07-25Back out the tracking of procs in struct selinfo. There's one seriousArtur Grabowski
bug in the code, but as soon as I try to fix it, it seems to trigger some other bugs. Instead of trying to figure out what's going on while everyone suffers, it's better to back out and figure out the bugs outside the tree.
2007-07-20Remove the MFREE() macro and replace it with a call to m_free().Claudio Jeker
Also remove the _MEXTREMOVE macro which was only used by MFREE. This time with the uipc_mbuf.c change that I missed last time.
2007-07-09Do not allow clustering read for filesystems which block size is smallerMiod Vallat
than the hardware page size, as was the case in the old clustering code. This fixes vnd reads on alpha and sparc64 On behalf of pedro@, ok art@
2007-07-03fix a memory leak that was introduced in r1.20 on 2007-06-24T05Z; ok dlgConstantine A. Murenin
2007-06-25use daddr64_t for size in bounds_check_with_label(); prompted by miod@;Otto Moerbeek
ok deraadt@
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
2007-06-21english, okay jmc@Pedro Martelletto
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-18ansify/de-register.Jasper Lievisse Adriaanse
no binary change
2007-06-17de-registerJasper Lievisse Adriaanse
ok thib@
2007-06-17significantly simplified disklabel infrastructure. MBR handling becomes MITheo de Raadt
to support hotplug media on most architectures. disklabel setup and verification done using new helper functions. Disklabels must *always* have a correct checksum now. Same code paths are used to learn on-disk location disklabels, to avoid new errors sneaking in. Tested on almost all cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn
2007-06-14Forgotten hackton diff: bounds check for seek on special devicesOtto Moerbeek
with a disklabel. Original diff from pedro@; ok pedro@ deraadt@
2007-06-11kill unneeded include;Thordur I. Bjornsson
(stdarg.h, leftover from the vararg's idea). ok tedu@
2007-06-10when we change fields in the label to version 1, fix the checksum (but onlyTheo de Raadt
if it was ok beforehands)
2007-06-10Add netbt files to common files for "make tags"Uwe Stuehler
2007-06-09blocks/sectors != blocks/blocks. Fix calculation of b_cylinder inKenneth R Westerback
bounds_check_with_label(). Tweak error path to eliminate duplicate code.
2007-06-09The differences in the last non-homogeneous bounds_check_with_label()Kenneth R Westerback
routines (alpha, vax) prove to be not worth keeping. Move bounds_check_with_label() into the MI world. Eliminate unreliable and almost certainly useless checks for overwriting a disklabel. After discussion with deraadt@
2007-06-09silently whack wrong-sized C partitionsTheo de Raadt
2007-06-09Protect access to 'bufhead' with splbio(), okay art@ millert@ marco@Pedro Martelletto
2007-06-09handle C non-0 start after doing v1 converstion.. sighTheo de Raadt
2007-06-09by hand i carefully found that all the differences in setdisklabel()Theo de Raadt
implimentations were simply either missing code, or spacing and such. setdisklabel() can become MI now.
2007-06-09be even more forceful with RAW_PART (and note this is the wrong, and ↵Theo de Raadt
temporary, place
2007-06-09push RAW_PART to 0 if it is non-zero, and bitchTheo de Raadt
2007-06-06fix format strings for block #'s now that they are 64 bit; ok tedu (whoTheo de Raadt
also spotted one more)
2007-06-06now that all partition size/offsets are potentially 64-bit, change theTheo de Raadt
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
2007-06-06oopsTheo de Raadt
2007-06-06even more problems with disk size consistancy checksTheo de Raadt
2007-06-06remove remaining IPX hooks. all inside #ifdef IPX, so no actual changeHenning Brauer
2007-06-05use six new macros to access & store the 48-bit disklabel fields relatedTheo de Raadt
to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values