]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpdate libarchive to 3.0.3
mm [Sat, 25 Feb 2012 10:58:02 +0000 (10:58 +0000)]
Update libarchive to 3.0.3

Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
https://github.com/libarchive/libarchive/wiki/ReleaseNotes

12 years agoWhen detaching an unix domain socket, uipc_detach() checks
trociny [Sat, 25 Feb 2012 10:15:41 +0000 (10:15 +0000)]
When detaching an unix domain socket, uipc_detach() checks
unp->unp_vnode pointer to detect if there is a vnode associated with
(binded to) this socket and does necessary cleanup if there is.

The issue is that after forced unmount this check may be too late as
the unp_vnode is reclaimed and the reference is stale.

To fix this provide a helper function that is called on a socket vnode
reclamation to do necessary cleanup.

Pointed by: kib
Reviewed by: kib
MFC after: 2 weeks

12 years agoIf an interrupt is received with no vap attached, just fail LINK events.
adrian [Sat, 25 Feb 2012 08:01:29 +0000 (08:01 +0000)]
If an interrupt is received with no vap attached, just fail LINK events.

This fixes a NULL pointer dereference which occurs if the vap list is
empty but someone brings up the wi0 interface.

12 years agoWhen using uidstart in /etc/adduser.conf, get the next
deischen [Sat, 25 Feb 2012 07:58:59 +0000 (07:58 +0000)]
When using uidstart in /etc/adduser.conf, get the next
available user id and show it in the "Uid [xxx]" prompt.

PR: 163863
Submitted by: Moritz Wilhelmy (mw at wzff dot de)
MFC after: 2 weeks

12 years agoUse correct Config registers for RTL8139 family. Unlike RTL8168 and
yongari [Sat, 25 Feb 2012 04:54:51 +0000 (04:54 +0000)]
Use correct Config registers for RTL8139 family. Unlike RTL8168 and
RTL810x family , RTL8139 has different register map for Config
registers.

While here, follow the lead of re(4) in WOL configuration.
 - Disable WOL_UCAST and WOL_MCAST capabilities by default.
 - Config5 register write does not need to unlock EEPROM access
   on RTL8139 family but unlocking EEPROM access does not affect
   its operation and make it consistent with re(4).

Reported by: Matt Renzelmann  mjr <> cs dot wisc dot edu

12 years agoIn revision 231989, we pass a 16-bit clock ID into kernel, however
davidxu [Sat, 25 Feb 2012 02:12:17 +0000 (02:12 +0000)]
In revision 231989, we pass a 16-bit clock ID into kernel, however
according to POSIX document, the clock ID may be dynamically allocated,
it unlikely will be in 64K forever. To make it future compatible, we
pack all timeout information into a new structure called _umtx_time, and
use fourth argument as a size indication, a zero means it is old code
using timespec as timeout value, but the new structure also includes flags
and a clock ID, so the size argument is different than before, and it is
non-zero. With this change, it is possible that a thread can sleep
on any supported clock, though current kernel code does not have such a
POSIX clock driver system.

12 years agoDo not write to the user address directly, use suword().
kib [Sat, 25 Feb 2012 01:33:39 +0000 (01:33 +0000)]
Do not write to the user address directly, use suword().

Reported by: Bengt Ahlgren <bengta sics se>
MFC after: 1 week

12 years agoFix a long-standing bug for AcpiOsGetTimer(). time_t is 32-bit on i386 and
jkim [Fri, 24 Feb 2012 23:15:21 +0000 (23:15 +0000)]
Fix a long-standing bug for AcpiOsGetTimer().  time_t is 32-bit on i386 and
it needs proper casting before multiplication.

MFC after: 3 days

12 years agoFix style in previous commit.
jhb [Fri, 24 Feb 2012 20:12:53 +0000 (20:12 +0000)]
Fix style in previous commit.

Submitted by: bde

12 years agoIn selectroute() add a missing fibnum argument to an in6_rtalloc()
bz [Fri, 24 Feb 2012 20:06:04 +0000 (20:06 +0000)]
In selectroute() add a missing fibnum argument to an in6_rtalloc()
call in an #if 0 section.

In in6_selecthlim() optimize a case where in6p cannot be NULL due to an
earlier check.

More consistently use u_int instead of int for fibnum function arguments.

Sponsored by: Cisco Systems, Inc.
MFC after: 3 days

12 years agoFix mdoc style nits. Start new sentences on new lines.
jkim [Fri, 24 Feb 2012 17:53:24 +0000 (17:53 +0000)]
Fix mdoc style nits.  Start new sentences on new lines.

Reported by: brueffer

12 years agoOnly look for a usable MAC address for the bridge ID from ports within our
thompsa [Fri, 24 Feb 2012 17:50:36 +0000 (17:50 +0000)]
Only look for a usable MAC address for the bridge ID from ports within our
bridge, this allows us to have more than one independent bridge in the same
STP domain.

PR: kern/164369
Submitted by: Nikos Vassiliadis (earlier version)
MFC after: 2 weeks

12 years agoAdjust the nfs_skip_wcc_data_onerr setting so that it does not block
jhb [Fri, 24 Feb 2012 17:26:06 +0000 (17:26 +0000)]
Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
post-op attributes for ENOENT errors now that the name caching logic
depends on working post-op attributes.

MFC after: 2 weeks

12 years agoUpdate scripts to work around two sh(1) bugs found in stable/8:
bz [Fri, 24 Feb 2012 14:13:06 +0000 (14:13 +0000)]
Update scripts to work around two sh(1) bugs found in stable/8:
1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.

Correct typos and improve some details forwarding.sh already
had in initiator, esp. related to ipfw accepting if the default
is deny.

Add an extra stat call to the "delay" function in addition to the
touch which together is still a lot faster than sleep 1 but seems
to help a lot more to mitigate the unrelated kernel race seen.

Sponsored by:   Cisco Systems, Inc.

12 years agoxargs: If a utility exits with 255 or a signal, write an error message.
jilles [Fri, 24 Feb 2012 12:35:17 +0000 (12:35 +0000)]
xargs: If a utility exits with 255 or a signal, write an error message.

If a utility called by xargs exits with status 255 or because of a signal,
POSIX requires writing an error message.

PR: 165155
Submitted by: Matthew Story matthewstory gmail com

12 years agoAdd underscore symbol to the end of definition strings
osa [Fri, 24 Feb 2012 11:40:20 +0000 (11:40 +0000)]
Add underscore symbol to the end of definition strings
to keep all calendar files are consistency.

Approved by: edwin
MFC after: 1 week

12 years agoRestore the return statement erronously removed in the r232048.
kib [Fri, 24 Feb 2012 11:02:35 +0000 (11:02 +0000)]
Restore the return statement erronously removed in the r232048.

Submitted by: cognet
Pointy hat to: kib (reuse the one I already got today)
MFC after: 13 days

12 years agoPlace the if() at the right location, to activate the v_writecount
kib [Fri, 24 Feb 2012 10:41:58 +0000 (10:41 +0000)]
Place the if() at the right location, to activate the v_writecount
accounting for shared writeable mappings for all filesystems, not only
for the bypass layers.

Submitted by: alc
Pointy hat to: kib
MFC after: 20 days

12 years agoExit with proper status when wake() fails.
jh [Fri, 24 Feb 2012 07:54:08 +0000 (07:54 +0000)]
Exit with proper status when wake() fails.

PR: bin/153527
Submitted by: Douglas Steinwand
MFC after: 2 weeks

12 years agostyle(9).
jh [Fri, 24 Feb 2012 07:49:55 +0000 (07:49 +0000)]
style(9).

MFC after: 2 weeks

12 years agoRemove an unused structure and unnecessary cast
kevlo [Fri, 24 Feb 2012 07:30:44 +0000 (07:30 +0000)]
Remove an unused structure and unnecessary cast

12 years agoCheck if the user has necessary permissions on the device
kevlo [Fri, 24 Feb 2012 07:29:06 +0000 (07:29 +0000)]
Check if the user has necessary permissions on the device

12 years agoHold IF_LOCK when manipulating the interface flags.
adrian [Fri, 24 Feb 2012 05:40:36 +0000 (05:40 +0000)]
Hold IF_LOCK when manipulating the interface flags.

It doesn't _really_ help all that much, I'll commit something to
sys/net/if.c at some point explaining why, but the lock should be held
when checking/manipulating/branching because of said lock.

12 years agoAlthough it's documented that the vap newstate call can drop the
adrian [Fri, 24 Feb 2012 05:39:00 +0000 (05:39 +0000)]
Although it's documented that the vap newstate call can drop the
comlock, I'd like to find and analyse these cases to see if they
really are valid.

So, throw in a lock here and wait for the (hopefully!) inevitable
complaints.

12 years agoAdd a radiotap vendor header definition.
adrian [Fri, 24 Feb 2012 05:33:11 +0000 (05:33 +0000)]
Add a radiotap vendor header definition.

12 years agoForced commit to denote that the commit message of r231621 should have read:
marius [Fri, 24 Feb 2012 00:42:50 +0000 (00:42 +0000)]
Forced commit to denote that the commit message of r231621 should have read:

- As it turns out, MSI-X is broken for at least LSI SAS1068E when passed
  through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here.
  Note that besides currently there not being a quirk type that disables
  MSI-X only and there's no evidence that MSI doesn't work with the VMware
  pass-through, it's really questionable whether MSI generally works in
  that setup as VMware only mention three know working devices [1, p. 4].
  Also not that this quirk entry currently doesn't affect the devices
  emulated by VMware in any way as these don't claim support MSI/MSI-X to
  begin with. [2]
  While at it, make the PCI quirk table const and static.
- Remove some duplicated empty lines.
- Use DEVMETHOD_END.

PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2]
Reviewed by: jhb
MFC after: 3 days

[1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf

12 years ago- Add support for Family 12h, 14h and 15h processors.
jkim [Fri, 24 Feb 2012 00:02:46 +0000 (00:02 +0000)]
- Add support for Family 12h, 14h and 15h processors.
- Remove all attempts to guess physical temperature using DiodeOffset.
There are too many reports that it varies wildly depending on motherboard.
Instead, if it is known to scale well and its offset is known from other
temperature sensors on board, the user may set "dev.amdtemp.0.sensor_offset"
tunable to compensate the difference.  Document the caveats in amdtemp(4).
- Add a quirk for Socket AM2 Revision G processors.  These processors are
known to have a different offset according to Linux k8temp driver.
- Warn about Family 10h Erratum 319.  These processors have broken sensors.
- Report temperature in more logical orders under dev.amdtemp node.  For
example, "dev.amdtemp.0.sensor0.core0" is now "dev.amdtemp.0.core0.sensor0".
- Replace K8, K10 and K11 with official processor names in amdtemp(4).

12 years agoBreak the last part to its own sentence rather than a run-on.
thompsa [Thu, 23 Feb 2012 23:37:29 +0000 (23:37 +0000)]
Break the last part to its own sentence rather than a run-on.

Suggested by: dougb

12 years agoAdd a sysctl/tunable default value for the use_flowid sysctl in r232008.
thompsa [Thu, 23 Feb 2012 21:56:53 +0000 (21:56 +0000)]
Add a sysctl/tunable default value for the use_flowid sysctl in r232008.

12 years agoUse a better way to silence unneeded internal declaration warnings in
dim [Thu, 23 Feb 2012 21:34:14 +0000 (21:34 +0000)]
Use a better way to silence unneeded internal declaration warnings in
several sys/cam/ctl files.

Suggested by: ed
Reviewed by: ken
MFC after: 1 week

12 years agoRevert r231978, so I can apply a more proper fix to silence unneeded
dim [Thu, 23 Feb 2012 21:32:32 +0000 (21:32 +0000)]
Revert r231978, so I can apply a more proper fix to silence unneeded
internal declaration warnings in several sys/cam/ctl files.

MFC after: 1 week

12 years agoPretty-print the advice constants passed to posix_fadvise(2).
jhb [Thu, 23 Feb 2012 21:08:21 +0000 (21:08 +0000)]
Pretty-print the advice constants passed to posix_fadvise(2).

MFC after: 2 weeks

12 years agoAccount the writeable shared mappings backed by file in the vnode
kib [Thu, 23 Feb 2012 21:07:16 +0000 (21:07 +0000)]
Account the writeable shared mappings backed by file in the vnode
v_writecount.  Keep the amount of the virtual address space used by
the mappings in the new vm_object un_pager.vnp.writemappings
counter. The vnode v_writecount is incremented when writemappings gets
non-zero value, and decremented when writemappings is returned to
zero.

Writeable shared vnode-backed mappings are accounted for in vm_mmap(),
and vm_map_insert() is instructed to set MAP_ENTRY_VN_WRITECNT flag on
the created map entry.  During deferred map entry deallocation,
vm_map_process_deferred() checks for MAP_ENTRY_VN_WRITECOUNT and
decrements writemappings for the vm object.

Now, the writeable mount cannot be demoted to read-only while
writeable shared mappings of the vnodes from the mount point
exist. Also, execve(2) fails for such files with ETXTBUSY, as it
should be.

Noted by: tegge
Reviewed by: tegge (long time ago, early version), alc
Tested by: pho
MFC after: 3 weeks

12 years agoIndicate this function decrements the timer as well as testing for expiry.
thompsa [Thu, 23 Feb 2012 20:58:52 +0000 (20:58 +0000)]
Indicate this function decrements the timer as well as testing for expiry.

12 years agoIf the VBE implementation does not support save/restore function, defer to
jkim [Thu, 23 Feb 2012 20:54:22 +0000 (20:54 +0000)]
If the VBE implementation does not support save/restore function, defer to
VGA methods.  Unconditionally reset the VESA adapter before restoring state.

12 years agoUpdate my copyright date.
jkim [Thu, 23 Feb 2012 19:16:05 +0000 (19:16 +0000)]
Update my copyright date.

12 years agoImport illumos changeset 13608 [1]:
mm [Thu, 23 Feb 2012 19:13:19 +0000 (19:13 +0000)]
Import illumos changeset 13608 [1]:

add support for "-t <datatype>" argument to zfs get

References:
https://www.illumos.org/issues/1936

Update zfs(8) manpage in respect of [1].
Fix typo in zfs(8) manpage.

Obtained from: illumos (issue #1936)
MFC after: 1 week

12 years agoProbe supported states for save/restore function. Some VBE implementation
jkim [Thu, 23 Feb 2012 19:05:57 +0000 (19:05 +0000)]
Probe supported states for save/restore function.  Some VBE implementation
refuses to save/restore states if an unsupported bit is set.

12 years agoFix a typo introduced in r231843.
jkim [Thu, 23 Feb 2012 18:59:32 +0000 (18:59 +0000)]
Fix a typo introduced in r231843.

12 years agoAdd isci(4) to the hardware notes.
brueffer [Thu, 23 Feb 2012 18:54:33 +0000 (18:54 +0000)]
Add isci(4) to the hardware notes.

MFC after: 3 days

12 years agoTo improve control over the use of mount(8) inside a jail(8), introduce
mm [Thu, 23 Feb 2012 18:51:24 +0000 (18:51 +0000)]
To improve control over the use of mount(8) inside a jail(8), introduce
a new jail parameter node with the following parameters:

allow.mount.devfs:
allow mounting the devfs filesystem inside a jail

allow.mount.nullfs:
allow mounting the nullfs filesystem inside a jail

Both parameters are disabled by default (equals the behavior before
devfs and nullfs in jails). Administrators have to explicitly allow
mounting devfs and nullfs for each jail. The value "-1" of the
devfs_ruleset parameter is removed in favor of the new allow setting.

Reviewed by: jamie
Suggested by: pjd
MFC after: 2 weeks

12 years agoRename DESCRIPTION section to HARDWARE, so this manpage can be used for
brueffer [Thu, 23 Feb 2012 18:48:02 +0000 (18:48 +0000)]
Rename DESCRIPTION section to HARDWARE, so this manpage can be used for
automatic hardware notes generation.

MFC after: 3 days

12 years agomerge pipe and fifo implementations
kmacy [Thu, 23 Feb 2012 18:37:30 +0000 (18:37 +0000)]
merge pipe and fifo implementations

Also reviewed by: jhb, jilles (initial revision)
Tested by: pho, jilles

Submitted by: gianni
Reviewed by: bde

12 years agoWhen using flowtable llentrys can outlive the interface with which they're associated
kmacy [Thu, 23 Feb 2012 18:21:37 +0000 (18:21 +0000)]
When using flowtable llentrys can outlive the interface with which they're associated
at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer
valid.

Move the free pointer in to the llentry itself and update the initalization sites.

MFC after: 2 weeks

12 years agoAdd pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install.
osa [Thu, 23 Feb 2012 17:47:48 +0000 (17:47 +0000)]
Add pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install.
It was forgotten in r219937 commit.

Approved by: edwin
MFC after: 1 week

12 years agoCatch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add().
brueffer [Thu, 23 Feb 2012 17:47:19 +0000 (17:47 +0000)]
Catch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add().

PR: 165424
Submitted by: Lachlan Kang
MFC after: 1 week

12 years agohrs@ reported a panic to freebsd-stable@ under the subject line
rmacklem [Thu, 23 Feb 2012 16:47:05 +0000 (16:47 +0000)]
hrs@ reported a panic to freebsd-stable@ under the subject line
"panic in 8.3-PRERELEASE" on Feb. 22, 2012. This panic was caused
by use of a mix of tsleep() and msleep() calls on the same event
in the new NFS server DRC code. It did "mtx_unlock(); tsleep();"
in two places, which kib@ noted introduced a slight risk that the
wakeup() would occur before the tsleep(), resulting in a 10sec
delay before waking up. This patch fixes the problem by replacing
"mtx_unlock(); tsleep();" with mtx_sleep(..PDROP..). It also
changes a nfsmsleep() call to mtx_sleep() so that the code uses
mtx_sleep() consistently within the file.

Tested by: hrs (in progress)
Reviewed by: jhb
MFC after: 5 days

12 years agoAllow the parent to gather the exit status of the children reparented
kib [Thu, 23 Feb 2012 11:50:23 +0000 (11:50 +0000)]
Allow the parent to gather the exit status of the children reparented
to the debugger.  When reparenting for debugging, keep the child in
the new orphan list of old parent.  When looping over the children in
kern_wait(), iterate over both children list and orphan list to search
for the process by pid.

Submitted by: Dmitry Mikulin <dmitrym juniper.net>
MFC after: 2 weeks

12 years agoUse the passed-in channel rather than ic->ic_curchan.
adrian [Thu, 23 Feb 2012 08:32:54 +0000 (08:32 +0000)]
Use the passed-in channel rather than ic->ic_curchan.

I'm not sure _why_ the ic is NULL here, but I've seen it occasionally do
this after I've been tinkering with things for a while.  It ends up
crashing in a call to ath_chan_set() via the net80211 scan code and scan
task.

12 years agoAdd check for IFF_DRV_RUNNING flag after serving an interrupt and
yongari [Thu, 23 Feb 2012 08:22:44 +0000 (08:22 +0000)]
Add check for IFF_DRV_RUNNING flag after serving an interrupt and
don't give RX path more priority than TX path.
Also remove infinite loop in interrupt handler and limit number of
iteration to 32. This change addresses system load fluctuations
under high network load.

12 years agoAvoid creating PCM devices for MIDI adapters.
hselasky [Thu, 23 Feb 2012 07:56:19 +0000 (07:56 +0000)]
Avoid creating PCM devices for MIDI adapters.

MFC after: 3 days

12 years agoWith r232015, sf(4) gets correct speed/duplex of established link.
yongari [Thu, 23 Feb 2012 06:35:18 +0000 (06:35 +0000)]
With r232015, sf(4) gets correct speed/duplex of established link.
Add more strict speed check in sf_miibus_statchg() and do not touch
MAC config registers when driver lost a link.

12 years agoNow that network interfaces advertise if they support linkstate notifications
thompsa [Thu, 23 Feb 2012 06:26:16 +0000 (06:26 +0000)]
Now that network interfaces advertise if they support linkstate notifications
we do not need to perform a media ioctl every 15 seconds.

12 years agoRemove taskqueue based MII stat change handler.
yongari [Thu, 23 Feb 2012 06:13:12 +0000 (06:13 +0000)]
Remove taskqueue based MII stat change handler.
Driver does not need deferred link state change processing.
While I'm here, do not report current link status if interface is
not UP.

12 years agoNo need to reprogram hardware RX filter when driver is not running.
yongari [Thu, 23 Feb 2012 05:25:14 +0000 (05:25 +0000)]
No need to reprogram hardware RX filter when driver is not running.

12 years agoIntroduce sf_ifmedia_upd_locked() and have driver reset PHY before
yongari [Thu, 23 Feb 2012 05:23:21 +0000 (05:23 +0000)]
Introduce sf_ifmedia_upd_locked() and have driver reset PHY before
switching to selected media.  While here, set if_drv_flags before
switching to selected media.

12 years agoIf there are not enough RX buffers, release partially allocated RX
yongari [Thu, 23 Feb 2012 05:14:11 +0000 (05:14 +0000)]
If there are not enough RX buffers, release partially allocated RX
buffers.

12 years agoGive hardware chance to drain active DMA cycles.
yongari [Thu, 23 Feb 2012 05:10:00 +0000 (05:10 +0000)]
Give hardware chance to drain active DMA cycles.

12 years agoConnect smcphy(4) to mii module build.
yongari [Thu, 23 Feb 2012 01:22:40 +0000 (01:22 +0000)]
Connect smcphy(4) to mii module build.

12 years agoAdd Seeq Technology 80220 PHY support to smcphy(4). This PHY is
yongari [Thu, 23 Feb 2012 01:20:21 +0000 (01:20 +0000)]
Add Seeq Technology 80220 PHY support to smcphy(4).  This PHY is
found on Adaptec AIC-6915 Starfire ethernet controller.
While here, use status register to know resolved speed/duplex.
With this change, sf(4) correctly reports speed/duplex of
established link.

Reviewed by: marius

12 years agobstp_input() always consumes the packet so remove the mbuf handling dance
thompsa [Thu, 23 Feb 2012 00:59:21 +0000 (00:59 +0000)]
bstp_input() always consumes the packet so remove the mbuf handling dance
around it.

Obtained from: OpenBSD (r1.37)

12 years agoXref the following in wlan(4):
gjb [Wed, 22 Feb 2012 22:40:20 +0000 (22:40 +0000)]
Xref the following in wlan(4):

- bwn(4)
- mwl(4)
- run(4)

MFC after: 3 days

12 years agoDocument the net.link.lagg.X.use_flowid sysctl from r232008.
thompsa [Wed, 22 Feb 2012 22:29:23 +0000 (22:29 +0000)]
Document the net.link.lagg.X.use_flowid sysctl from r232008.

12 years agoMake it clear that fec is just an alias
thompsa [Wed, 22 Feb 2012 22:09:17 +0000 (22:09 +0000)]
Make it clear that fec is just an alias

12 years agoUsing the flowid in the mbuf assumes the network card is giving a good hash for
thompsa [Wed, 22 Feb 2012 22:01:30 +0000 (22:01 +0000)]
Using the flowid in the mbuf assumes the network card is giving a good hash for
the traffic flow, this may not be the case giving poor traffic distribution.
Add a sysctl which allows us to fall back to our own flow hash code.

PR: kern/164901
Submitted by: Eugene Grosbein
MFC after: 1 week

12 years agolibc: Eliminate some relative relocations in fmtmsg().
jilles [Wed, 22 Feb 2012 21:47:50 +0000 (21:47 +0000)]
libc: Eliminate some relative relocations in fmtmsg().

12 years agoo Use ISO 3166 county code for Sweden.
maxim [Wed, 22 Feb 2012 21:08:58 +0000 (21:08 +0000)]
o Use ISO 3166 county code for Sweden.

PR: standards/165400
Submitted by: Carsten Hey
MFC after: 1 week

12 years agoProperly lock DQREF() with dqhlock. Missed locking caused counter
kib [Wed, 22 Feb 2012 20:03:51 +0000 (20:03 +0000)]
Properly lock DQREF() with dqhlock. Missed locking caused counter
corruption.

Assert that the dq reference value is sane before decrementing it.

Reported and tested by: pho
MFC after: 1 week

12 years agoRemove wrong comment.
kib [Wed, 22 Feb 2012 20:01:38 +0000 (20:01 +0000)]
Remove wrong comment.

Discussed with: alc
MFC after: 3 days

12 years agoDragonFly 3.0.1 added.
maxim [Wed, 22 Feb 2012 17:52:53 +0000 (17:52 +0000)]
DragonFly 3.0.1 added.

12 years agoFix various typos and normalize spelling.
jpaetzel [Wed, 22 Feb 2012 15:05:19 +0000 (15:05 +0000)]
Fix various typos and normalize spelling.

Approved by: kib (mentor)

12 years agoUse DOINGASYNC() to test for async allowance, to honor VFS syncing requests.
kib [Wed, 22 Feb 2012 13:01:17 +0000 (13:01 +0000)]
Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests.

Noted by: bde
MFC after: 1 week

12 years agoRevert r231829, that was my braino.
glebius [Wed, 22 Feb 2012 09:08:51 +0000 (09:08 +0000)]
Revert r231829, that was my braino.

12 years agoFix typo.
davidxu [Wed, 22 Feb 2012 07:34:23 +0000 (07:34 +0000)]
Fix typo.

12 years agoHandle NULL return from crypt(3). Mostly from DragonFly
kevlo [Wed, 22 Feb 2012 06:27:20 +0000 (06:27 +0000)]
Handle NULL return from crypt(3). Mostly from DragonFly

12 years agoRemove reference to gsched_as module, which doesn't
eadler [Wed, 22 Feb 2012 04:51:17 +0000 (04:51 +0000)]
Remove reference to gsched_as module, which doesn't
actually exist.

PR: docs/163043
Submitted by: olgeni
Approved by: brd
MFC after: 3 days

12 years agoDon't use `m' after m_megapullup.
ae [Wed, 22 Feb 2012 04:19:33 +0000 (04:19 +0000)]
Don't use `m' after m_megapullup.

PR: kern/165373
MFC after: 3 days

12 years agoUpdate to tcsh 6.18.01.
mp [Wed, 22 Feb 2012 03:36:15 +0000 (03:36 +0000)]
Update to tcsh 6.18.01.

12 years agoUse unused fourth argument of umtx_op to pass flags to kernel for operation
davidxu [Wed, 22 Feb 2012 03:22:49 +0000 (03:22 +0000)]
Use unused fourth argument of umtx_op to pass flags to kernel for operation
UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower
16bits is used to pass flags. The change saves a clock_gettime() syscall
from libthr.

12 years agoRefctor address assignment for Octeon's ethernet ports:
gonzo [Wed, 22 Feb 2012 01:30:25 +0000 (01:30 +0000)]
Refctor address assignment for Octeon's ethernet ports:

- Centralize address assignment
- Make sure managment ports get first MAC address in pool
- Properly propagate fail if address allocation failed

Submitted by: Andrew Duane <aduane@juniper.net>

12 years agoReturn NULL on error rather than ":", per the crypt(3) man page.
kevlo [Wed, 22 Feb 2012 01:23:14 +0000 (01:23 +0000)]
Return NULL on error rather than ":", per the crypt(3) man page.
Discussed in: http://www.openwall.com/lists/oss-security/2011/11/15/3

12 years agoFix memset sizeof
kevlo [Wed, 22 Feb 2012 01:08:59 +0000 (01:08 +0000)]
Fix memset sizeof

12 years agolibc: Add some tests for fmtmsg().
jilles [Tue, 21 Feb 2012 23:46:41 +0000 (23:46 +0000)]
libc: Add some tests for fmtmsg().

12 years agoWhen building with clang, disable -Wformat-security for
dim [Tue, 21 Feb 2012 21:20:52 +0000 (21:20 +0000)]
When building with clang, disable -Wformat-security for
sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings:

sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
            S_IRUSR | S_IWUSR, driver_name);
                               ^~~~~~~~~~~
@/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from:
#define driver_name hpt27xx_driver_name
                    ^~~~~~~~~~~~~~~~~~~

Since 'hpt27xx_driver_name' is a constant string symbol (coming from the
proprietary hpt27xx_lib.o file), there is no security problem.

Because this driver is provided by the vendor, and applying changes
requires re-certification and other bureaucratic exercises, just disable
the warning for now.

MFC after: 1 week

12 years agoWhen building with clang, disable -Wunneeded-internal-declaration for
dim [Tue, 21 Feb 2012 20:55:43 +0000 (20:55 +0000)]
When building with clang, disable -Wunneeded-internal-declaration for
several sys/cam/ctl files, since these get the following warnings:

In file included from sys/cam/ctl/ctl_backend.c:60:
sys/cam/ctl/ctl_private.h:300:30: error: variable 'page_index_template' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static struct ctl_page_index page_index_template[] = {
                             ^

These warnings are tricky to fix without a lot of overhaul, and they are
harmless, so disable them for now.

MFC after: 1 week

12 years agounp_connect() may use a shared lock on the vnode to fetch the socket.
trociny [Tue, 21 Feb 2012 19:40:13 +0000 (19:40 +0000)]
unp_connect() may use a shared lock on the vnode to fetch the socket.

Suggested by: jhb
Reviewed by: jhb, kib, rwatson
MFC after: 2 weeks

12 years agoMake vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.
trociny [Tue, 21 Feb 2012 19:35:59 +0000 (19:35 +0000)]
Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.

Reviewed by: kib
MFC after: 1 week

12 years agoAvoid error log for transfer stop w/o error code.
emaste [Tue, 21 Feb 2012 14:59:07 +0000 (14:59 +0000)]
Avoid error log for transfer stop w/o error code.

A number of tftp clients, including the one in Intel's pxe boot loader,
may intentionally stop a transfer using error code 0 (i.e., EUNDEF).
These are not real errors.  Avoid spamming log files with these by
logging them at level LOG_DEBUG instead.

Discussed on -hackers with an initial patch proposal; this change is an
improved approach suggested by kan@.

12 years agoFix found places where uio_resid is truncated to int.
kib [Tue, 21 Feb 2012 01:05:12 +0000 (01:05 +0000)]
Fix found places where uio_resid is truncated to int.

Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the
sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from
the usermode.

Discussed with: bde, das (previous versions)
MFC after: 1 month

12 years agoDocument the fact that getgrouplist(3) returns 0 on success.
pjd [Mon, 20 Feb 2012 20:46:27 +0000 (20:46 +0000)]
Document the fact that getgrouplist(3) returns 0 on success.

MFC after: 3 days

12 years agoAdd oce(4) to the hardware notes.
brueffer [Mon, 20 Feb 2012 19:35:54 +0000 (19:35 +0000)]
Add oce(4) to the hardware notes.

MFC after: 3 days

12 years agoRemove redundant forward declaration of struct ieee80211com.
ray [Mon, 20 Feb 2012 15:05:21 +0000 (15:05 +0000)]
Remove redundant forward declaration of struct ieee80211com.

Approved by: bschmidt

12 years agoSet the O_CLOEXEC flag when opening the pidfile to avoid leaking the
ghelmer [Mon, 20 Feb 2012 13:59:24 +0000 (13:59 +0000)]
Set the O_CLOEXEC flag when opening the pidfile to avoid leaking the
file descriptor via exec(3).

Now that daemon(8) has been fixed to resolve the issue noted by trociny,
the consensus is that this change should be OK.

12 years agoMore improvements, the biggest one using list environments for enumerations.
brueffer [Mon, 20 Feb 2012 13:22:00 +0000 (13:22 +0000)]
More improvements, the biggest one using list environments for enumerations.

12 years agoRemove an unnecessary cast.
kevlo [Mon, 20 Feb 2012 09:56:14 +0000 (09:56 +0000)]
Remove an unnecessary cast.

12 years agoRevert r231923 for now. Further work is needed to make sure that the
delphij [Mon, 20 Feb 2012 09:32:32 +0000 (09:32 +0000)]
Revert r231923 for now.  Further work is needed to make sure that the
behavior is consistent.

12 years agoIf nested scheme allows dump kernel to its partition, we may allow
ae [Mon, 20 Feb 2012 06:35:52 +0000 (06:35 +0000)]
If nested scheme allows dump kernel to its partition, we may allow
dump for the parent partition too.

MFC after: 2 weeks

12 years agoAdd alias for the partition type 0x0f. Now "ebr" name is used for both
ae [Mon, 20 Feb 2012 05:48:57 +0000 (05:48 +0000)]
Add alias for the partition type 0x0f. Now "ebr" name is used for both
types 0x05 and 0x0f, but 0x05 is preferred and used when partition is
created with "gpart add -t ebr ...".
This should keep EBR partitions accessible after r231754 for those,
who have EBR on the partition with type 0x0f.

12 years agoBreak out the radar code into a separate source file.
adrian [Mon, 20 Feb 2012 03:07:07 +0000 (03:07 +0000)]
Break out the radar code into a separate source file.

This mirrors the internal HAL organisation and reduces the differences
between the HAL codebases slightly.

Obtained from: Atheros

12 years agoReturn BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver.
delphij [Mon, 20 Feb 2012 01:18:32 +0000 (01:18 +0000)]
Return BUS_PROBE_DEFAULT instead of 0 because this is an in-tree driver.

MFC after: 1 month