]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoExecute the start/stop process of a jail in the background.
Remko Lodder [Mon, 2 Nov 2009 09:56:46 +0000 (09:56 +0000)]
Execute the start/stop process of a jail in the background.
This will prevent that the script hangs during startup, which
could cause annoying effects after rebooting for example.

PR: kern/139422
Submitted by: Andrey Groshev <greenx at yartv dot ru>
Approved by: imp (mentor, implicit)
MFC after: 3 days
Facilitated by: Snow B.V.

14 years agoThe async callback could free the device. If it is a broadcast async,
Alexander Motin [Mon, 2 Nov 2009 08:31:00 +0000 (08:31 +0000)]
The async callback could free the device. If it is a broadcast async,
it doesn't hold device reference, so take our own reference.

Submitted by:   thompsa

14 years agoAttempt to reduce accidental foot-shooting by pointing out that
Colin Percival [Mon, 2 Nov 2009 07:21:13 +0000 (07:21 +0000)]
Attempt to reduce accidental foot-shooting by pointing out that
accept(2)ed sockets do not necessarily inherit O_NONBLOCK from
listening sockets on non-FreeBSD platforms.

Feet shot: cperciva
MFC after: 1 month

14 years ago- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
Andrew Thompson [Sun, 1 Nov 2009 21:48:18 +0000 (21:48 +0000)]
- Add usb_fill_bulk_urb() and usb_bulk_msg() linux compat functions [1]
- Don't write actual length if the actual length pointer is NULL [2]
- correct Linux Compatibility error codes for short isochronous IN transfers
  and make status field signed.

Submitted by: Leunam Elebek [1], Manuel Gebele [2]

14 years agoFix a corner case where usbd_transfer_drain() can return too early if the
Andrew Thompson [Sun, 1 Nov 2009 21:44:37 +0000 (21:44 +0000)]
Fix a corner case where usbd_transfer_drain() can return too early if the
callback has dropped the mutex, leading to a panic.

Submitted by: HPS
MFC after: 3 days

14 years agoCheck unit number and provide string name for consdev.
Andrew Thompson [Sun, 1 Nov 2009 21:41:44 +0000 (21:41 +0000)]
Check unit number and provide string name for consdev.

Submitted by: HPS

14 years agoRefine r198714, it's not as easy as just leaving the major number zero.
Christian Brueffer [Sun, 1 Nov 2009 18:25:11 +0000 (18:25 +0000)]
Refine r198714, it's not as easy as just leaving the major number zero.

Submitted by: ed
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Sun, 1 Nov 2009 13:06:15 +0000 (13:06 +0000)]
MFp4:
Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may
release DMA constrants even more, but it require some additional handling.

14 years agoExpand DESCRIPTION and a basic EXAMPLES section.
Christian Brueffer [Sun, 1 Nov 2009 11:39:07 +0000 (11:39 +0000)]
Expand DESCRIPTION and a basic EXAMPLES section.

PR: 139605
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Sun, 1 Nov 2009 11:31:06 +0000 (11:31 +0000)]
MFp4:
Fix reference counting bug, when device unreferenced before then
invalidated. To do it, do not handle validity flag as another
reference, but explicitly modify reference count each time flag is
modified.

Discovered by: thompsa

14 years agoReplace -iprefix with -isystem. We only need alternative header
Roman Divacky [Sun, 1 Nov 2009 08:20:30 +0000 (08:20 +0000)]
Replace -iprefix with -isystem. We only need alternative header
files search path and thus -isystem is sufficient. -iprefix is
meant to do something entirely different.

Approved by: ed (mentor)
OKed by: ru, kan
Tested by: make universe

14 years agoReimplement the lazy FP context switching:
Marcel Moolenaar [Sat, 31 Oct 2009 22:27:31 +0000 (22:27 +0000)]
Reimplement the lazy FP context switching:
o   Move all code into a single file for easier maintenance.
o   Use a single global lock to avoid having to handle either
    multiple locks or race conditions.
o   Make sure to disable the high FP registers after saving
    or dropping them.
o   use msleep() to wait for the other CPU to save the high
    FP registers.

This change fixes the high FP inconsistency panics.

A single global lock typically serializes too much, which may
be noticable when a lot of threads use the high FP registers,
but in that case it's probably better to switch the high FP
context synchronuously. Put differently: cpu_switch() should
switch the high FP registers if the incoming and outgoing
threads both use the high FP registers.

14 years agoUnbreak cpu_switch(). The register allocator in my brain is clearly
Nathan Whitehorn [Sat, 31 Oct 2009 20:59:13 +0000 (20:59 +0000)]
Unbreak cpu_switch(). The register allocator in my brain is clearly
broken. Also, Altivec context switching worked before only by accident,
but should work now by design.

14 years agoRemove an unnecessary sync that crept in the last commit.
Nathan Whitehorn [Sat, 31 Oct 2009 18:04:34 +0000 (18:04 +0000)]
Remove an unnecessary sync that crept in the last commit.

14 years agoFix a race in casuword() exposed by csup. casuword() non-atomically read
Nathan Whitehorn [Sat, 31 Oct 2009 17:59:24 +0000 (17:59 +0000)]
Fix a race in casuword() exposed by csup. casuword() non-atomically read
the current value of its argument before atomically replacing it, which
could occasionally return the wrong value on an SMP system. This resulted
in user mutex operations hanging when using threaded applications.

14 years agoLoop on blocked threads when using ULE scheduler, removing an
Nathan Whitehorn [Sat, 31 Oct 2009 17:55:48 +0000 (17:55 +0000)]
Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.

14 years agoGarbage collect set_user_sr(), which is declared static inline and
Nathan Whitehorn [Sat, 31 Oct 2009 17:46:50 +0000 (17:46 +0000)]
Garbage collect set_user_sr(), which is declared static inline and
never called.

14 years agoCorrect an error in vm_fault_copy_entry() that has existed since the first
Alan Cox [Sat, 31 Oct 2009 17:39:56 +0000 (17:39 +0000)]
Correct an error in vm_fault_copy_entry() that has existed since the first
version of this file.  When a process forks, any wired pages are immediately
copied because copy-on-write is not supported for wired pages.  In other
words, the child process is given its own private copy of each wired page
from its parent's address space.  Unfortunately, to date, these copied pages
have been mapped into the child's address space with the wrong permissions,
typically VM_PROT_ALL.  This change corrects the permissions.

Reviewed by: kib

14 years agoWhile certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)
Stefan Eßer [Sat, 31 Oct 2009 17:06:36 +0000 (17:06 +0000)]
While certain supported Symbios/LSI SCSI chips (532c89653c100053c1010)
do support 64bit addresses, the current SCRIPTS code supports only 32bit
addresses causing data corruption for buffer addresses >4GB. This problem
affects 64bit machines with more than 4GB RAM or amd64 with 4GB and
memory hole remapping.
Work-around this problem with a bus_dma tag that requests bounce-buffers
for addresses >4GB. This causes some overhead, but given the maximum SCSI
bus speed of 160MB/s compared, the effect should hardly be noticeable.
The problem was reported by Mike Watters (mike at mwatters net) who also
verified that this fix cures the problem.

Since this change is a NOOP on systems with less than 4GB RAM and fixes
data corruption (in RAM and on disk) on systems with more than 4GB, I hope
that this change is accepted for 8.0.

MFC after: 3 days (pending approval)

14 years agoAllow newly added controllers to use full I/O sizes.
Alexander Motin [Sat, 31 Oct 2009 14:19:50 +0000 (14:19 +0000)]
Allow newly added controllers to use full I/O sizes.

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 13:24:14 +0000 (13:24 +0000)]
MFp4:
- Remove most of direct relations between ATA(4) peripherial and controller
levels. It makes logic more transparent and is a mandatory step to wrap
ATA(4) controller level into ATA-native CAM SIM.
- Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger
I/O transaction sizes without additional cost.

14 years agoThe majors file was removed long ago, 0 should be used instead.
Christian Brueffer [Sat, 31 Oct 2009 12:22:23 +0000 (12:22 +0000)]
The majors file was removed long ago, 0 should be used instead.

PR: 139230
Submitted by: pluknet <pluknet@gmail.com>
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 10:47:47 +0000 (10:47 +0000)]
MFp4:
Sync connection speed reporting with kernel.
Report speed in identify command, same as done by inquiry.

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 10:43:38 +0000 (10:43 +0000)]
MFp4:
- Reduce code duplication in ATA XPT and PMP driver.
- Move PIO size setting from ada driver to ATA XPT. It is XPT business
to negotiate transfer details. ada driver is now stateless.
- Report PIO size to SIM. It is required for correct PATA SIM operation.
- Tune PMP scan timings. It workarounds some problems with SiI.
- If reset hapens during PMP initialization - restart it.
- Introduce early-initialized periph drivers, which are used during initial
scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance
to finish scan before mountroot and numerate devices in right order.

14 years agoUnobfuscate unit number handling in apm(4).
Ed Schouten [Sat, 31 Oct 2009 10:38:30 +0000 (10:38 +0000)]
Unobfuscate unit number handling in apm(4).

There is no need to use the lower 4 bits of the unit number to store the
device type number. Just use 0 and 1 to distinguish them. devfs also
guarantees that there can never be an open call on a device that has a
unit number different to 0 and 1, so there is no need to check for this
in open().

14 years agoTurn unused structure fields of cdevsw into spares.
Ed Schouten [Sat, 31 Oct 2009 10:35:41 +0000 (10:35 +0000)]
Turn unused structure fields of cdevsw into spares.

d_uid, d_gid and d_mode are unused, because permissions are stored in
cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer
keep a list of cdevsw's, so d_list is also unused.

uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment
constraints of d_kind, we can safely turn it into three 32-bit integers.
d_kind and d_list is equal in size to three pointers.

Discussed with: kib

14 years agoMFp4:
Alexander Motin [Sat, 31 Oct 2009 09:03:48 +0000 (09:03 +0000)]
MFp4:
Ensure target/lun passed from user-level supported on this bus.
Scanning unsupported IDs causes different issues from duplicate
devices to system crash.

14 years ago- zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
Pawel Jakub Dawidek [Fri, 30 Oct 2009 23:33:06 +0000 (23:33 +0000)]
- zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
  zfs_access() instead of vaccess() in this case as well.
- If VADMIN is specified with another V* flag (unlikely) call both
  zfs_access() and vaccess() after spliting V* flags.

This fixes "dirtying snapshot!" panic.

PR: kern/139806
Reported by: Carl Chave <carl@chave.us>
In co-operation with: jh
MFC after: 3 days

14 years agoWhen reading input from a file or device (via -f option) set the
Kirk McKusick [Fri, 30 Oct 2009 21:54:53 +0000 (21:54 +0000)]
When reading input from a file or device (via -f option) set the
input to be in non-buffering mode so that input lines are logged
as they occur rather than being saved up until a buffer's worth of
input has been logged.

14 years agoAdd support for different request block format used by Gen-IIe Marvell SATA.
Alexander Motin [Fri, 30 Oct 2009 20:28:49 +0000 (20:28 +0000)]
Add support for different request block format used by Gen-IIe Marvell SATA.
This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller.

14 years agoFix botched git -> svn merge.
Robert Noland [Fri, 30 Oct 2009 18:30:13 +0000 (18:30 +0000)]
Fix botched git -> svn merge.

MFC after: 2 weeks

14 years agoCleanup in r600_blit
Robert Noland [Fri, 30 Oct 2009 18:08:46 +0000 (18:08 +0000)]
Cleanup in r600_blit

 - Don't bother to assign vb until we know we have enough space
 - Add variables for sx2, sy2, dx2, dy2 so that these aren't
   calculated over and over, also reduce chance of errors.
 - Use switch to assign color/format

MFC after: 3 days

14 years agoA bit of cleanup work on radeon_freelist_get()
Robert Noland [Fri, 30 Oct 2009 18:07:22 +0000 (18:07 +0000)]
A bit of cleanup work on radeon_freelist_get()

  * Fix the main loop to search all buffers before sleeping.
  * Remove dead code

MFC after: 3 days

14 years agoSome general cleanup of scatter/gather memory allocation
Robert Noland [Fri, 30 Oct 2009 18:02:10 +0000 (18:02 +0000)]
Some general cleanup of scatter/gather memory allocation

 - We don't need to check malloc return values with M_WAITOK
 - remove variables that we don't really need
 - cleanup the error paths by just calling drm_sg_cleanup()
 - fix drm_sg_cleanup() to be safe to call at any time

MFC after: 2 weeks

14 years agoUse system specified memory barriers rather than rolling our own.
Robert Noland [Fri, 30 Oct 2009 16:59:58 +0000 (16:59 +0000)]
Use system specified memory barriers rather than rolling our own.

14 years agoFix blitter support for RS880 chips
Robert Noland [Fri, 30 Oct 2009 16:55:31 +0000 (16:55 +0000)]
Fix blitter support for RS880 chips

MFC after: 3 days

14 years agoAdd support for Adaptec 39320LPE adapters.
Christian Brueffer [Fri, 30 Oct 2009 16:23:56 +0000 (16:23 +0000)]
Add support for Adaptec 39320LPE adapters.

PR: 124202
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Reviewed by: gibbs
MFC after: 1 week

14 years agoMake procstat -k work on PowerPC by avoiding mistakenly using signed
Nathan Whitehorn [Fri, 30 Oct 2009 16:00:34 +0000 (16:00 +0000)]
Make procstat -k work on PowerPC by avoiding mistakenly using signed
compares with a low address (0x1000) and a high address
(the KVA kernel stack).

14 years agoAdd notes pointing out that bsdiff does not store file hashes and
Colin Percival [Fri, 30 Oct 2009 11:13:00 +0000 (11:13 +0000)]
Add notes pointing out that bsdiff does not store file hashes and
bspatch thus does not verify file hashes, and that consequently it
is recommended that users store hashes separately and verify files
before and after running bspatch.

Requested by: BugMagnet
MFC after: 1 week

14 years agoTrapsignal() and postsig() call kern_sigprocmask() with both process
Konstantin Belousov [Fri, 30 Oct 2009 10:10:39 +0000 (10:10 +0000)]
Trapsignal() and postsig() call kern_sigprocmask() with both process
lock and curproc->p_sigacts->ps_mtx. Reschedule_signals may need to have
ps_mtx locked to decide and wakeup a thread, causing recursion on the
mutex.

Inform kern_sigprocmask() and reschedule_signals() about lock state
of the ps_mtx by new flag SIGPROCMASK_PS_LOCKED to avoid recursion.

Reported and tested by: keramida
MFC after: 1 month

14 years agoAdd missing ATA kernel options dependencies.
Alexander Motin [Thu, 29 Oct 2009 20:53:26 +0000 (20:53 +0000)]
Add missing ATA kernel options dependencies.

MFC after: 3 days

14 years ago- Numerous whitespace and style fixes.
John Baldwin [Thu, 29 Oct 2009 18:03:16 +0000 (18:03 +0000)]
- Numerous whitespace and style fixes.
- More descriptive error messages when failing to parse components during
  attach.

14 years agoImprove round robin stream scheduler and cleanup some code.
Michael Tuexen [Thu, 29 Oct 2009 17:40:33 +0000 (17:40 +0000)]
Improve round robin stream scheduler and cleanup some code.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoWhen fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
John Baldwin [Thu, 29 Oct 2009 17:34:02 +0000 (17:34 +0000)]
When fetching sum stats (vmstat -s) from a crash dump, fetch per-CPU counts
and sum them to form the total counts.

PR: bin/135893
Submitted by: Mikolaj Golub  to my trociny of gmail
MFC after: 1 week

14 years agoAdd additional featuresState.fBits entries to simplify compiling and
Ed Maste [Thu, 29 Oct 2009 17:21:41 +0000 (17:21 +0000)]
Add additional featuresState.fBits entries to simplify compiling and
testing Adaptec's vendor driver.

Submitted by: Adaptec, driver 17517

14 years agoRename aac_srb32 to aac_srb, to match Adaptec's vendor driver.
Ed Maste [Thu, 29 Oct 2009 17:14:18 +0000 (17:14 +0000)]
Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver.

14 years agoRevert part of r198363, there is no "device cam", it is
Christian Brueffer [Thu, 29 Oct 2009 15:59:27 +0000 (15:59 +0000)]
Revert part of r198363, there is no "device cam", it is
included in "device scbus".

MFC after: 3 days

14 years agoRename aac_fast_intr to aac_filter to reflect its current use. Eliminate
Ed Maste [Thu, 29 Oct 2009 14:53:45 +0000 (14:53 +0000)]
Rename aac_fast_intr to aac_filter to reflect its current use.  Eliminate
the fallback of using the filter as an interrupt handler, as it is no
longer needed.

Discussed with: scottl, jhb

14 years agoTrapsignal() calls kern_sigprocmask() when delivering catched signal
Konstantin Belousov [Thu, 29 Oct 2009 14:34:24 +0000 (14:34 +0000)]
Trapsignal() calls kern_sigprocmask() when delivering catched signal
with proc lock held.

Reported and tested by: Mykola Dzham  freebsd at levsha org ua
MFC after: 1 month

14 years agoTurn off Altivec data-stream prefetching before going into power-save
Nathan Whitehorn [Thu, 29 Oct 2009 14:22:09 +0000 (14:22 +0000)]
Turn off Altivec data-stream prefetching before going into power-save
mode on those CPUs that need it.

14 years agoDefine identify fields described in CF specification.
Alexander Motin [Thu, 29 Oct 2009 13:52:34 +0000 (13:52 +0000)]
Define identify fields described in CF specification.

14 years agoInclude the output of the ddb(4) capture buffer.
John Baldwin [Thu, 29 Oct 2009 13:45:33 +0000 (13:45 +0000)]
Include the output of the ddb(4) capture buffer.

Submitted by: Mikolaj Golub  to my trociny of gmail
MFC after: 3 days

14 years agoWhen extracting the capture buffer from a crashdump, only read the valid
John Baldwin [Thu, 29 Oct 2009 13:44:58 +0000 (13:44 +0000)]
When extracting the capture buffer from a crashdump, only read the valid
portion of the capture buffer (db_capture_bufoff vs db_capture_bufsize).
This could result in outputting garbage (e.g. lots of 'p' characters if
DIAGNOSTIC is enabled) after the end of the capture buffer.  While here,
fix a spelling nit.

Reported by: Mikolaj Golub  to my trociny of gmail
MFC after: 3 days

14 years agoAdd some magic taken from OS X and Linux to support early revision K2
Nathan Whitehorn [Thu, 29 Oct 2009 13:28:37 +0000 (13:28 +0000)]
Add some magic taken from OS X and Linux to support early revision K2
SATA controllers, like those found on the G5 Xserve.

Reviewed by: mav

14 years agoTurn off use of ATA_A_4BIT on modern hardware. This flag was already
Nathan Whitehorn [Thu, 29 Oct 2009 13:27:14 +0000 (13:27 +0000)]
Turn off use of ATA_A_4BIT on modern hardware. This flag was already
obsoleted in 1996 by ATA-2, and crashes some modern hardware like some
revisions of the Serverworks K2 SATA controller. Even very ancient
hardware seems not to require it. In the unlikely event this causes
problems, the previous behavior can be re-enabled by defining
ATA_LEGACY_SUPPORT at the top of this file.

Reviewed by: Alexander Motin <mav@freebsd.org>

14 years agoUpdate the route's sequence number upon receiving a RANN.
Rui Paulo [Thu, 29 Oct 2009 12:19:10 +0000 (12:19 +0000)]
Update the route's sequence number upon receiving a RANN.

MFC after: 3 days

14 years agoFix style issue.
Konstantin Belousov [Thu, 29 Oct 2009 10:03:08 +0000 (10:03 +0000)]
Fix style issue.

14 years agoUpdate some comments regarding ktr(4).
Ruslan Ermilov [Thu, 29 Oct 2009 09:51:13 +0000 (09:51 +0000)]
Update some comments regarding ktr(4).

14 years agoBack in 2003, get_cyclecount() was changed to use binuptime() instead
Ruslan Ermilov [Thu, 29 Oct 2009 09:45:05 +0000 (09:45 +0000)]
Back in 2003, get_cyclecount() was changed to use binuptime() instead
of nanotime().  Reflect this change in a manpage.

Reviewed by: phk, markm

14 years agoHZ is now 1000 on most platforms, update a comment.
Ruslan Ermilov [Thu, 29 Oct 2009 09:27:09 +0000 (09:27 +0000)]
HZ is now 1000 on most platforms, update a comment.

Reviewed by: phk, markm

14 years agoFix some problems with effective mmap() offsets > 32 bits. This was
John Baldwin [Wed, 28 Oct 2009 20:17:54 +0000 (20:17 +0000)]
Fix some problems with effective mmap() offsets > 32 bits.  This was
partially fixed on amd64 earlier.  Rather than forcing linux_mmap_common()
to use a 32-bit offset, have it accept a 64-bit file offset.  This offset
is then passed to the real mmap() call.  Rather than inventing a structure
to hold the normal linux_mmap args that has a 64-bit offset, just pass
each of the arguments individually to linux_mmap_common() since that more
closes matches the existing style of various kern_foo() functions.

Submitted by: Christian Zander @ Nvidia
MFC after: 1 week

14 years agoRemove spurious `)`
Christian Brueffer [Wed, 28 Oct 2009 15:22:58 +0000 (15:22 +0000)]
Remove spurious `)`

PR: 137758
Submitted by: Henning Petersen <henning.petersen@t-online.de>
MFC after: 1 week

14 years agoFix date (1) and SEE ALSO section.
Christian Brueffer [Wed, 28 Oct 2009 14:39:27 +0000 (14:39 +0000)]
Fix date (1) and SEE ALSO section.

Submitted by: Ulrich Spoerlein (1)
MFC after: 1 week

14 years agoInitialize f_rabuf in the raw device case. A subsequent close()
Christian Brueffer [Wed, 28 Oct 2009 14:13:45 +0000 (14:13 +0000)]
Initialize f_rabuf in the raw device case. A subsequent close()
later on would try to free it, leading to a crash.

PR: 93998
Submitted by: neel
MFC after: 1 week

14 years agoDo first controller time sync after 1 minute, as in Adaptec's vendor
Ed Maste [Wed, 28 Oct 2009 13:50:28 +0000 (13:50 +0000)]
Do first controller time sync after 1 minute, as in Adaptec's vendor
driver.

14 years agoClose a stream file descriptor leak.
Christian Brueffer [Wed, 28 Oct 2009 12:10:29 +0000 (12:10 +0000)]
Close a stream file descriptor leak.

PR: 138130
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week

14 years agoMove pselect(3) man page to section 2.
Konstantin Belousov [Wed, 28 Oct 2009 11:14:32 +0000 (11:14 +0000)]
Move pselect(3) man page to section 2.

Noted by: jhb
MFC after: 1 month

14 years agoClose a file descriptor leak in an error case.
Christian Brueffer [Wed, 28 Oct 2009 10:06:27 +0000 (10:06 +0000)]
Close a file descriptor leak in an error case.

PR: 138374
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week

14 years agoNow that the zoneinfo data is automatically updated when a new world
Edwin Groothuis [Wed, 28 Oct 2009 07:05:32 +0000 (07:05 +0000)]
Now that the zoneinfo data is automatically updated when a new world
is installed, we should at least have the tzsetup tool available!

Suggested by: Andriy Gapon <avg@freebsd.org>
Noticed by: Ben Kaduk <minimarmot@gmail.com>
MFC after: 1 week

14 years agoWhitespace fixup: 8 spaces -> tab
Ed Maste [Tue, 27 Oct 2009 19:37:37 +0000 (19:37 +0000)]
Whitespace fixup: 8 spaces -> tab

14 years agoBugfix: Use formula from section 7.2.3 of RFC 4960. Reported by Martin Becke.
Michael Tuexen [Tue, 27 Oct 2009 18:17:07 +0000 (18:17 +0000)]
Bugfix: Use formula from section 7.2.3 of RFC 4960. Reported by Martin Becke.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoFix typos and mdoc style.
Christian Brueffer [Tue, 27 Oct 2009 17:22:03 +0000 (17:22 +0000)]
Fix typos and mdoc style.

14 years agoDon't ignore the return value of g_modevent() in fdc_modevent().
Jaakko Heinonen [Tue, 27 Oct 2009 17:14:22 +0000 (17:14 +0000)]
Don't ignore the return value of g_modevent() in fdc_modevent().

Approved by: trasz (mentor)

14 years agoDon't ignore the return value of g_modevent() in acd_modevent().
Jaakko Heinonen [Tue, 27 Oct 2009 17:12:59 +0000 (17:12 +0000)]
Don't ignore the return value of g_modevent() in acd_modevent().

Approved by: trasz (mentor)

14 years agoAdd link for callout_schedule(9).
Ed Maste [Tue, 27 Oct 2009 14:37:25 +0000 (14:37 +0000)]
Add link for callout_schedule(9).

14 years agoMFV of tzdata2009p
Edwin Groothuis [Tue, 27 Oct 2009 11:13:51 +0000 (11:13 +0000)]
MFV of tzdata2009p
Merge of r198513

- Argentina does not go to DST this year.

14 years agoVendor import of tzdata2009p
Edwin Groothuis [Tue, 27 Oct 2009 11:08:24 +0000 (11:08 +0000)]
Vendor import of tzdata2009p

- Argentina will not go in DST this year.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoRegenerate
Konstantin Belousov [Tue, 27 Oct 2009 11:02:04 +0000 (11:02 +0000)]
Regenerate

14 years agoRegenerate
Konstantin Belousov [Tue, 27 Oct 2009 11:01:40 +0000 (11:01 +0000)]
Regenerate

14 years agoRegenerate
Konstantin Belousov [Tue, 27 Oct 2009 11:01:15 +0000 (11:01 +0000)]
Regenerate

14 years agoCommit libc files missed in r198508
Konstantin Belousov [Tue, 27 Oct 2009 10:57:53 +0000 (10:57 +0000)]
Commit libc files missed in r198508

14 years agoCurrent pselect(3) is implemented in usermode and thus vulnerable to
Konstantin Belousov [Tue, 27 Oct 2009 10:55:34 +0000 (10:55 +0000)]
Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by: davidxu
Tested by: pho
MFC after: 1 month

14 years agoIn r197963, a race with thread being selected for signal delivery
Konstantin Belousov [Tue, 27 Oct 2009 10:47:58 +0000 (10:47 +0000)]
In r197963, a race with thread being selected for signal delivery
while in kernel mode, and later changing signal mask to block the
signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race
exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls.

Use kern_sigprocmask() instead of direct manipulation of td_sigmask to
reschedule newly blocked signals, closing the race.

Reviewed by: davidxu
Tested by: pho
MFC after: 1 month

14 years agoIn kern_sigsuspend(), better manipulate thread signal mask using
Konstantin Belousov [Tue, 27 Oct 2009 10:42:24 +0000 (10:42 +0000)]
In kern_sigsuspend(), better manipulate thread signal mask using
kern_sigprocmask() to properly notify other possible candidate threads
for signal delivery.

Since sigsuspend() shall only return to usermode after a signal was
delivered, do cursig/postsig loop immediately after waiting for
signal, repeating the wait if wakeup was spurious due to race with
other thread fetching signal from the process queue before us. Add
thread_suspend_check() call to allow the thread to be stopped or killed
while in loop.

Modify last argument of kern_sigprocmask() from boolean to flags,
allowing the function to be called with locked proc. Convertion of the
callers that supplied 1 to the old argument will be done in the next
commit, and due to SIGPROCMASK_OLD value equial to 1, code is formally
correct in between.

Reviewed by: davidxu
Tested by: pho
MFC after: 1 month

14 years agoWhen protection of wired read-only mapping is changed to read-write,
Konstantin Belousov [Tue, 27 Oct 2009 10:15:58 +0000 (10:15 +0000)]
When protection of wired read-only mapping is changed to read-write,
install new shadow object behind the map entry and copy the pages
from the underlying objects to it. This makes the mprotect(2) call to
actually perform the requested operation instead of silently do nothing
and return success, that causes SIGSEGV on later write access to the
mapping.

Reuse vm_fault_copy_entry() to do the copying, modifying it to behave
correctly when src_entry == dst_entry.

Reviewed by: alc
MFC after: 3 weeks

14 years agoDon't leak a file descriptor when ejecting a CDROM.
Colin Percival [Mon, 26 Oct 2009 23:24:59 +0000 (23:24 +0000)]
Don't leak a file descriptor when ejecting a CDROM.

Submitted by: Ronald Klop, trhodes
Note to self: don't do commits while half-asleep

14 years agoSync with the other archs and wrapper the prototype of in_cksum_skip(9)
Marius Strobl [Mon, 26 Oct 2009 22:00:26 +0000 (22:00 +0000)]
Sync with the other archs and wrapper the prototype of in_cksum_skip(9)
in #ifdef _KERNEL.

Submitted by: Ulrich Spoerlein
MFC after: 1 month

14 years agoRevert r198500 for now, this will break situations when
Andrew Thompson [Mon, 26 Oct 2009 21:47:16 +0000 (21:47 +0000)]
Revert r198500 for now, this will break situations when
hw.pci.usb_early_takeover is set to zero and the SMM release
is never done.

Pointed out by: marcel

14 years agoRemove usb controller takeover code now that it is handled by the pci code.
Andrew Thompson [Mon, 26 Oct 2009 20:23:15 +0000 (20:23 +0000)]
Remove usb controller takeover code now that it is handled by the pci code.

Reminded by: jhb
Reviewed by: HPS

14 years agoImprove the round robin stream scheduler.
Michael Tuexen [Mon, 26 Oct 2009 19:23:34 +0000 (19:23 +0000)]
Improve the round robin stream scheduler.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoTrim empty mergeinfo.
John Baldwin [Mon, 26 Oct 2009 19:10:54 +0000 (19:10 +0000)]
Trim empty mergeinfo.

14 years agoAnother nit that both I and ispell missed.
John Baldwin [Mon, 26 Oct 2009 18:32:06 +0000 (18:32 +0000)]
Another nit that both I and ispell missed.

Submitted by: Ben Kaduk  minimarmot of gmail

14 years agoThere is no need to "busy" a page when the object is locked for the duration
Alan Cox [Mon, 26 Oct 2009 18:02:05 +0000 (18:02 +0000)]
There is no need to "busy" a page when the object is locked for the duration
of the operation.

14 years agoFix some spelling nits.
John Baldwin [Mon, 26 Oct 2009 17:42:03 +0000 (17:42 +0000)]
Fix some spelling nits.

14 years agoFix typo in bluetooth.3
Maksim Yevmenkin [Mon, 26 Oct 2009 17:27:30 +0000 (17:27 +0000)]
Fix typo in bluetooth.3
Do not use reserved C++ keyword "new"

MFC after: 1 month

14 years agoFix parsing of mount options specified with -o in case an option with
Jaakko Heinonen [Mon, 26 Oct 2009 14:57:33 +0000 (14:57 +0000)]
Fix parsing of mount options specified with -o in case an option with
value is preceded by an option without value (for example -o
option1,option2=value). Options must be separated before searching for
'='. Also compare pnextopt explicitly against NULL.

PR: bin/134069
Approved by: trasz (mentor)

14 years agoMerge r198489 from vendor/ncurses/dist:
Rong-En Fan [Mon, 26 Oct 2009 13:03:52 +0000 (13:03 +0000)]
Merge r198489 from vendor/ncurses/dist:

 Pull upstream patch to fix ee(1) crash when received SIGWINCH:

   modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
   SIGWINCH, and discard that value, to avoid confusing application
   (patch by Eygene Ryabinkin, FreeBSD bin/136223).

PR: 136223
Submitted by: Eygene Ryabinkin
Obtained from: ncurses-5.7-20091024 snapshot
MFC after: 3 days

14 years agoPull upstream patch to fix ee(1) crash when received SIGWINCH:
Rong-En Fan [Mon, 26 Oct 2009 13:01:29 +0000 (13:01 +0000)]
Pull upstream patch to fix ee(1) crash when received SIGWINCH:

  modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
  SIGWINCH, and discard that value, to avoid confusing application
  (patch by Eygene Ryabinkin, FreeBSD bin/136223).

PR: 136223
Submitted by: Eygene Ryabinkin
Obtained from: ncurses-5.7-20091024 snapshot
MFC after: 3 days

14 years agoReport SATA speeds to CAM, to not confuse users with low numbers logged.
Alexander Motin [Mon, 26 Oct 2009 11:26:49 +0000 (11:26 +0000)]
Report SATA speeds to CAM, to not confuse users with low numbers logged.

14 years agoRound timeout up when converting CAM milliseconds to ATA seconds.
Alexander Motin [Mon, 26 Oct 2009 11:23:41 +0000 (11:23 +0000)]
Round timeout up when converting CAM milliseconds to ATA seconds.