]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r230449:
mm [Sun, 29 Jan 2012 12:26:09 +0000 (12:26 +0000)]
MFC r230449:
Merge illumos revisions 13540, 13562:

illumos rev 13540 [1]:
Removal of pyzfs broke delegation for volumes

illumos rev 13562 [2]:
zfs allow arguments not parsed correctly after pyzfs removal

References:
https://www.illumos.org/issues/1726 [1]
https://www.illumos.org/issues/1977 [2]

Obtained from: illumos (issues #1726, #1977)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229002:
dumbbell [Sun, 29 Jan 2012 11:00:00 +0000 (11:00 +0000)]
MFC r229002:
Set svn:executable on dhclient-script

Sponsored by: Yakaz (http://www.yakaz.com)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230460:
kib [Sun, 29 Jan 2012 04:44:52 +0000 (04:44 +0000)]
MFC r230460:
Clarify the implementation-defined behaviour in case of close(2)
returning error.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227912
marius [Sun, 29 Jan 2012 01:40:39 +0000 (01:40 +0000)]
MFC: r227912

- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
  duplicating it.
- In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227908
marius [Sun, 29 Jan 2012 01:35:14 +0000 (01:35 +0000)]
MFC: r227908

Use DEVMETHOD_END.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230718 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226173, r227848
marius [Sun, 29 Jan 2012 01:27:39 +0000 (01:27 +0000)]
MFC: r226173, r227848

s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention
of kobj(9) from device drivers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230715 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227843 (partial)
marius [Sun, 29 Jan 2012 01:22:48 +0000 (01:22 +0000)]
MFC: r227843 (partial)

- There's no need to overwrite the default device method with the default
  one. Interestingly, these are actually the default for quite some time
  (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
  since r52045) but even recently added device drivers do this unnecessarily.
  Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
  Discussed with: jhb
- Also while at it, use __FBSDID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230714 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227688
marius [Sun, 29 Jan 2012 01:01:35 +0000 (01:01 +0000)]
MFC: r227688

There's no need export the device interface methods of miibus(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@230712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227687, r228290 (partial)
marius [Sun, 29 Jan 2012 01:00:16 +0000 (01:00 +0000)]
MFC: r227687, r228290 (partial)

- Add a hint.miibus.X.phymask hint, allowing do individually exclude PHY
  addresses from being probed and attaching something including ukphy(4)
  to it. This is mainly necessarily for PHY switches that create duplicate
  or fake PHYs on the bus that can corrupt the PHY state when accessed or
  simply cause problems when ukphy(4) isolates the additional instances.
- Change miibus(4) to be a hinted bus, allowing to add child devices via
  hints and to set their attach arguments (including for automatically
  probed PHYs). This is mainly needed for PHY switches that violate IEEE
  802.3 and don't even implement the basic register set so we can't probe
  them automatically. However, the ability to alter the attach arguments
  for automatically probed PHYs is also useful as for example it allows
  to test (or tell a user to test) new variant of a PHY with a specific
  driver by letting an existing driver attach to it via manipulating the
  IDs without the need to touch the source code or to limit a Gigabit
  Ethernet PHY to only announce up to Fast Ethernet in order to save
  energy  by limiting the capability mask. Generally, a driver has to
  be hinted via hint.phydrv.X.at="miibusY" and hint.phydrv.X.phyno="Z"
  (which already is sufficient to add phydrvX at miibusY at PHY address
  Z). Then optionally the following attach arguments additionally can
  be configured:
  hint.phydrv.X.id1
  hint.phydrv.X.id2
  hint.phydrv.X.capmask
- Some minor cleanup.

Reviewed by: adrian, ray

git-svn-id: svn://svn.freebsd.org/base/stable/8@230710 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227686
marius [Sun, 29 Jan 2012 00:52:07 +0000 (00:52 +0000)]
MFC: r227686

There's no need to read DC_10BTSTAT twice in dcphy_status().

git-svn-id: svn://svn.freebsd.org/base/stable/8@230708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227685
marius [Sun, 29 Jan 2012 00:50:50 +0000 (00:50 +0000)]
MFC: r227685

- There's no need to ignore the return value of mii_attach(9) when attaching
  dcphy(4) (CID 9283).
- In dc_detach(), check whether ifp is NULL as dc_attach() may call the
  former without ifp being allocated (CID 4288).

Found with: Coverity Prevent(tm)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227043
marius [Sun, 29 Jan 2012 00:49:14 +0000 (00:49 +0000)]
MFC: r227043

Sprinkle some const.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226950
marius [Sun, 29 Jan 2012 00:47:14 +0000 (00:47 +0000)]
MFC: r226950

Add multiple inclusion protection.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230702 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226948
marius [Sun, 29 Jan 2012 00:45:54 +0000 (00:45 +0000)]
MFC: r226948

Remove unnecessary DMA constraints.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226270
marius [Sun, 29 Jan 2012 00:42:54 +0000 (00:42 +0000)]
MFC: r226270

- Remove unused remnants of MII bitbang'ing.
- Sprinkle const.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226175
marius [Sun, 29 Jan 2012 00:41:08 +0000 (00:41 +0000)]
MFC: r226175

In device_get_children() avoid malloc(0) in order to increase portability
to other operating systems.

PR: 154287

git-svn-id: svn://svn.freebsd.org/base/stable/8@230696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226171
marius [Sun, 29 Jan 2012 00:35:22 +0000 (00:35 +0000)]
MFC: r226171

Sprinkle const.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230693 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r226118
marius [Sun, 29 Jan 2012 00:34:19 +0000 (00:34 +0000)]
MFC: r226118

Sync with ahc(4)/ahd(4)/sym(4) etc:
Zero any sense not transferred by the device as the SCSI specification
mandates that any untransferred data should be assumed to be zero.

Reviewed by: ken

git-svn-id: svn://svn.freebsd.org/base/stable/8@230692 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225931, r225932, r227000
marius [Sun, 29 Jan 2012 00:00:15 +0000 (00:00 +0000)]
MFC: r225931, r225932, r227000

Make sparc64 compatible with NEW_PCIB and enable it:
- Implement bus_adjust_resource() methods as far as necessary and in non-PCI
  bridge drivers as far as feasible without rototilling them.
- As NEW_PCIB does a layering violation by activating resources at layers
  above pci(4) without previously bubbling up their allocation there, move
  the assignment of bus tags and handles from the bus_alloc_resource() to
  the bus_activate_resource() methods like at least the other NEW_PCIB
  enabled architectures do. This is somewhat unfortunate as previously
  sparc64 (ab)used resource activation to indicate whether SYS_RES_MEMORY
  resources should be mapped into KVA, which is only necessary if their
  going to be accessed via the pointer returned from rman_get_virtual() but
  not for bus_space(9) as the later always uses physical access on sparc64.
  Besides wasting KVA if we always map in SYS_RES_MEMORY resources, a driver
  also may deliberately not map them in if the firmware already has done so,
  possibly in a special way. So in order to still allow a driver to decide
  whether a SYS_RES_MEMORY resource should be mapped into KVA we let it
  indicate that by calling bus_space_map(9) with BUS_SPACE_MAP_LINEAR as
  actually documented in the bus_space(9) page. This is implemented by
  allocating a separate bus tag per SYS_RES_MEMORY resource and passing the
  resource via the previously unused bus tag cookie so we later on can call
  rman_set_virtual() in sparc64_bus_mem_map(). As a side effect this now
  also allows to actually indicate that a SYS_RES_MEMORY resource should be
  mapped in as cacheable and/or read-only via BUS_SPACE_MAP_CACHEABLE and
  BUS_SPACE_MAP_READONLY respectively.
- Do some minor cleanup like taking advantage of rman_init_from_resource(),
  factor out the common part of bus tag allocation into a newly added
  sparc64_alloc_bus_tag(), hook up some missing newbus methods and replace
  some homegrown versions with the generic counterparts etc.
- While at it, let apb_attach() (which can't use the generic NEW_PCIB code
  as APB bridges just don't have the base and limit registers implemented)
  regarding the config space registers cached in pcib_softc and the SYSCTL
  reporting nodes set up.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r203845
marius [Sat, 28 Jan 2012 23:46:36 +0000 (23:46 +0000)]
MFC: r203845

Add ssm(4), which serves as a glue device allowing devices beneath the
scalable shared memory node, which is used in large UltraSPARC III based
machines to group snooping-coherency domains together, like schizo(4) to
be treated like nexus(4) children.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230686 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r206451, r206453
marius [Sat, 28 Jan 2012 23:45:31 +0000 (23:45 +0000)]
MFC: r206451, r206453

Add sbbc(4), a driver for the BootBus controller found in Serengeti and
StarCat systems which provides time-of-day services for both as well as
console service for Serengeti, i.e. Sun Fire V1280. While the latter is
described with a device type of serial in the OFW device tree, it isn't
actually an UART. Nevertheless the console service is handled by uart(4)
as this allowed to re-use quite a bit of MD and MI code. Actually, this
idea is stolen from Linux which interfaces the sun4v hypervisor console
with the Linux counterpart of uart(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@230685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225901
marius [Sat, 28 Jan 2012 23:37:05 +0000 (23:37 +0000)]
MFC: r225901

Remove obsolete macros.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225899
marius [Sat, 28 Jan 2012 23:33:53 +0000 (23:33 +0000)]
MFC: r225899

Also allocate space for the PIL counters. Given that no machine actually
uses IV_MAX interrupt vectors this wasn't a problem in practice though.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230681 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225891
marius [Sat, 28 Jan 2012 23:26:55 +0000 (23:26 +0000)]
MFC: r225891

Re-reading the Schizo errata suggests that it's actually tolerable to
also use the streaming buffer of pre version 5/revision 2.3 hardware as
long as we stay away from context flushes (which iommu(4) so far doesn't
take advantage of). OpenSolaris does the same.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230678 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225890
marius [Sat, 28 Jan 2012 23:25:31 +0000 (23:25 +0000)]
MFC: r225890

- Add protective parentheses to macros as far as possible.
- Move {r,w,}mb() to the top of this file where they live on most of the
  other architectures.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230676 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225889, r228222
marius [Sat, 28 Jan 2012 23:24:08 +0000 (23:24 +0000)]
MFC: r225889, r228222

In total store which we use for running the kernel and all of the userland
atomic operations behave as if they were followed by a CPU memory barrier
so there's no need to include ones in the acquire variants of atomic(9) and
it's sufficient to just use include compiler memory barriers to satisfy
the requirements of atomic(9). Removing the CPU memory barriers results in
a small performance improvement, specifically this is sufficient to
compensate the performance loss seen in the worldstone benchmark seen when
using SCHED_ULE instead of SCHED_4BSD.
This change is inspired by Linux even more radically doing the equivalent
thing some time ago.
Thanks go to Peter Jeremy for additional testing.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230674 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225888
marius [Sat, 28 Jan 2012 23:18:02 +0000 (23:18 +0000)]
MFC: r225888

Add a comment about why contrary to what once would think running all of
userland with total store order actually is appropriate.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225887
marius [Sat, 28 Jan 2012 23:16:49 +0000 (23:16 +0000)]
MFC: r225887

Use the extended integer condition code when comparing 64-bit values. Given
that ATOMIC_INC_LONG currently is unused this happened to not be fatal.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225886
marius [Sat, 28 Jan 2012 23:15:04 +0000 (23:15 +0000)]
MFC: r225886

- Right-justify backslashes as suggested by style(9).
- Rename ATOMIC_INC_ULONG to ATOMIC_INC_LONG in order to be consistent with
  the names of the other macros in this file an adjust accordingly.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230668 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228022, r228026
marius [Sat, 28 Jan 2012 23:13:00 +0000 (23:13 +0000)]
MFC: r228022, r228026

For sparc64 also adjust the geometry of da(4) driven disks to not overflow
the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The
geometry chosen for disks above that limit allows to use disks up to 2TB,
which is the limit of the extended VTOC8 format. The geometry used for
disks smaller than the 16-bit cylinders limit stays the same as used by
cam_calc_geometry(9) for extended translation.
Thanks to Hans-Joerg Sirtl for providing hardware for testing this change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230327:
eadler [Sat, 28 Jan 2012 21:45:20 +0000 (21:45 +0000)]
MFC r230327:
 Add support for Sony Ericsson GC89 EDGE/Wirelles LAN PC Card

PR: kern/131933
Approved by: cperciva

git-svn-id: svn://svn.freebsd.org/base/stable/8@230660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230109:
eadler [Sat, 28 Jan 2012 19:33:02 +0000 (19:33 +0000)]
MFC r230109:
 - Document TheDraw splash screens in the default loader.conf

Approved by: cperciva

git-svn-id: svn://svn.freebsd.org/base/stable/8@230651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r230100
rmacklem [Sat, 28 Jan 2012 02:18:50 +0000 (02:18 +0000)]
MFC: r230100
Tai Horgan reported via email that there were two places in
the new NFSv4 server where the code follows the wrong list.
Fortunately, for these fairly rare cases, the lc_stateid[]
lists are normally empty. This patch fixes the code to
follow the correct list.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230638 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230496: Remove the stale XXX rt_newaddrmsg comment.
pluknet [Fri, 27 Jan 2012 07:37:10 +0000 (07:37 +0000)]
MFC r230496: Remove the stale XXX rt_newaddrmsg comment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228259:
dumbbell [Thu, 26 Jan 2012 22:01:05 +0000 (22:01 +0000)]
MFC r228259:
Support domain-search in dhclient(8)

The "domain-search" option (option 119) allows a DHCP server to publish
a list of implicit domain suffixes used during name lookup. This option
is described in RFC 3397.

For instance, if the domain-search option says:
    ".example.org .example.com"
and one wants to resolve "foobar", the resolver will try:
    1. "foobar.example.org"
    2. "foobar.example.com"

The file /etc/resolv.conf is updated with a "search" directive if the
DHCP server provides "domain-search".

A regression test suite is included in this patch under
tools/regression/sbin/dhclient.

PR: bin/151940
Sponsored by: Yakaz (http://www.yakaz.com)

MFC r229000:
Invalid Domain Search option isn't considered as a fatal error

In the original Domain Search option patch, an invalid option value
would cause the whole lease to be rejected. However, DHCP servers who
emit such an invalid value are more common than I thought. With this new
patch, just the option is rejected, not the entire lease.

PR: bin/163431
Submitted by: Fabian Keil <fk@fabiankeil.de> (earlier version)
Reviewed by: Fabian Keil <fk@fabiankeil.de>
Sponsored by: Yakaz (http://www.yakaz.com)

MFC r229001:
Adapt testsuite following change in Domain Search error handling

In this testsuite, warning() and error() have the same behaviour.

PR: bin/163431
Sponsored by: Yakaz (http://www.yakaz.com)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230603 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227992:
dumbbell [Thu, 26 Jan 2012 19:18:10 +0000 (19:18 +0000)]
MFC r227992:

Prevent a division by zero with some broken batteries

This problem was seen on a laptop with a dead battery.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223666:
ae [Thu, 26 Jan 2012 10:33:19 +0000 (10:33 +0000)]
MFC r223666:
  Add new rule actions "call" and "return" to ipfw. They make
  possible to organize subroutines with rules.

  The "call" action saves the current rule number in the internal
  stack and rules processing continues from the first rule with
  specified number (similar to skipto action). If later a rule with
  "return" action is encountered, the processing returns to the first
  rule with number of "call" rule saved in the stack plus one or higher.

  Submitted by: Vadim Goncharov

git-svn-id: svn://svn.freebsd.org/base/stable/8@230575 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222281:
ae [Thu, 26 Jan 2012 09:56:29 +0000 (09:56 +0000)]
MFC r222281:
  Do not truncate available disk space to the closest track boundary.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230573 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222279:
ae [Thu, 26 Jan 2012 09:28:09 +0000 (09:28 +0000)]
MFC r222279:
  Do not truncate available disk space to the closest track boundary.

MFC r222341:
  Some partitioning tools may have a different opinion about disk
  geometry and partitions may start from withing the first track.
  If we found such partitions, then do not reserve space of the
  first track, only first sector.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230570 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216132 (by ivoras):
ae [Thu, 26 Jan 2012 09:14:51 +0000 (09:14 +0000)]
MFC r216132 (by ivoras):
  Add a note about the magic number 20. Actually, 22.75 entries fit in
  a 512 byte sector but when choosing magic numbers, 20 looks nicer.

MFC r223332:
  Change the way how we update bootcode for BSD scheme.
  Since the only parameter that we check is size of bootcode, then
  allow only two sizes: size of boot1 and size of /boot/boot.
  This partially protects users from losing ability to boot if incorrect
  bootcode is specified.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230569 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoDisable integrity checks by default. It will warn users about found
ae [Thu, 26 Jan 2012 08:51:23 +0000 (08:51 +0000)]
Disable integrity checks by default. It will warn users about found
problems, but will not reject partition tables.

This is direct commit to stable/8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230568 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221788:
ae [Thu, 26 Jan 2012 08:47:29 +0000 (08:47 +0000)]
MFC r221788:
  Add basic metadata integrity check. In case when partition table was
  probed and read successfull, but it contains invalid values (e.g.
  overlapped partitions, offset or size is out of bounds), then table
  will be rejected.

MFC r221972:
  Add a sysctl kern.geom.part.check_integrity for those who has corrupt
  partition tables and lost an ability to boot after r221788.
  Also unhide an error message from bootverbose, this would help to
  easier determine the problem.

MFC r221984:
  Add diagnostic messages for integrity checks.

MFC r221992:
  Make diagnostic messages more specific. With bootverbose print out
  all inconsistencies of integrity in the partition table, not first
  found only.

MFC r222642:
  Add diagnostic message about not aligned partitions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226880 (modified version):
ae [Thu, 26 Jan 2012 07:51:51 +0000 (07:51 +0000)]
MFC r226880 (modified version):
  Our geom withering function could take some time before geom with its
  providers and consumers will be destroyed.  Before take some actions
  with a geom, check that it is not destroyed at the moment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r215118:
ae [Thu, 26 Jan 2012 07:42:54 +0000 (07:42 +0000)]
MFC r215118:
  Move code for search of existing geom into g_part_find_geom
  function and use this function instead of g_part_parm_geom
  in g_part_ctl_create.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230565 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226113 and r228016:
andre [Wed, 25 Jan 2012 11:15:52 +0000 (11:15 +0000)]
MFC r226113 and r228016:
 Prevent TCP sessions from stalling indefinitely in reassembly
 when reaching the zone limit of reassembly queue entries.

Reviewed by: lstewart

git-svn-id: svn://svn.freebsd.org/base/stable/8@230534 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230459:
kib [Wed, 25 Jan 2012 07:14:23 +0000 (07:14 +0000)]
MFC r230459:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230528 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r229956
rmacklem [Wed, 25 Jan 2012 02:22:16 +0000 (02:22 +0000)]
MFC: r229956
jwd@ reported via email that the "CacheSize" field reported by "nfsstat -e -s"
would go negative after using the "-z" option to zero out the stats.
This patch fixes that by not zeroing out the srvcache_size field
for "-z", since it is the size of the cache and not a counter

git-svn-id: svn://svn.freebsd.org/base/stable/8@230521 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230256:
pluknet [Tue, 24 Jan 2012 10:32:02 +0000 (10:32 +0000)]
MFC r230256:
 Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing
 the allocated memory before calling mtx_init(9) on mtx pointing to it.
 Otherwize, random contents of uninitialized memory might occasionally
 trigger the assertion.

 Reported by:  Pavel Polyakov <bsd kobyla org>
 Reviewed by:  pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@230498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230402, r230404:
mm [Mon, 23 Jan 2012 08:30:17 +0000 (08:30 +0000)]
MFC r230402, r230404:
Add accidentially removed copyright lines in r228103

Reported by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@230477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r229085 from head:
gavin [Sun, 22 Jan 2012 21:25:47 +0000 (21:25 +0000)]
Merge r229085 from head:

  Default to not performing the early-boot memory tests when we detect we
  are booting inside a VM.  There are three reasons to disable this:

  o  It causes the VM host to believe that all the tested pages or RAM are
     in use.  This in turn may force the host to page out pages of RAM
     belonging to other VMs, or otherwise cause problems with fair resource
     sharing on the VM cluster.
  o  It adds significant time to the boot process (around 1 second/Gig in
     testing)
  o  It is unnecessary - the host should have already verified that the
     memory is functional etc.

  Note that this simply changes the default when in a VM - it can still be
  overridden using the hw.memtest.tests tunable.

Early MFC requested by: bz

git-svn-id: svn://svn.freebsd.org/base/stable/8@230472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r229802
rmacklem [Sun, 22 Jan 2012 06:00:50 +0000 (06:00 +0000)]
MFC: r229802
opt_inet6.h was missing from some files in the new NFS subsystem.
The effect of this was, for clients mounted via inet6 addresses,
that the DRC cache would never have a hit in the server. It also
broke NFSv4 callbacks when an inet6 address was the only one available
in the client. This patch fixes the above, plus deletes opt_inet6.h
from a couple of files it is not needed for.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228746
alc [Sat, 21 Jan 2012 18:38:57 +0000 (18:38 +0000)]
MFC r228746
  The Xen pmap doesn't support superpages.  So, there is no point in it
  initializing structures, like the pv table, that are only used to
  implement superpages.  In fact, some of the unnecessary code in
  pmap_init() was actually doing harm.  It was preventing the kernel from
  booting on virtual machines with more than 768 MB of memory.

Note: The change to pmap_page_is_mapped() differs slightly from r228746
  because of differences in how the page queues lock is used in
  FreeBSD 8.x.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230433 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227827
rmh [Sat, 21 Jan 2012 18:21:44 +0000 (18:21 +0000)]
MFC r227827
  Define __FreeBSD_kernel__ macro in sys/param.h.

  __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
  which by definition is always true on FreeBSD. This macro is also defined
  on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.

  It is tempting to use this macro in userland code when we want to enable
  kernel-specific routines, and in fact it's fine to do this in code that
  is part of FreeBSD itself.  However, be aware that as presence of this
  macro is still not widespread (e.g. older FreeBSD versions, 3rd party
  compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in
  external applications without also checking for __FreeBSD__ as an
  alternative.

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226163, r228317, and r228324
alc [Sat, 21 Jan 2012 07:21:44 +0000 (07:21 +0000)]
MFC r226163, r228317, and r228324
  Fix the handling of an empty kmem map by sysctl_kmem_map_free().

  Eliminate the possibility of 32-bit arithmetic overflow in the
  calculation of vm_kmem_size that may occur if the system
  administrator has specified a vm.vm_kmem_size tunable value that
  exceeds the hard cap.

  Eliminate stale numbers from a comment.

PR: 162741

git-svn-id: svn://svn.freebsd.org/base/stable/8@230419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229898:
lstewart [Sat, 21 Jan 2012 04:22:19 +0000 (04:22 +0000)]
MFC r229898:

Consumers of bpfdetach() expect it to remove all bpf_if structs from the
bpf_iflist list which reference the specified ifnet. The existing implementation
only removes the first matching bpf_if found in the list, effectively leaking
list entries if an ifnet has been bpfattach()ed multiple times with different
DLTs.

Fix the leak by performing the detach logic in a loop, stopping when all bpf_if
structs referencing the specified ifnet have been detached and removed from the
bpf_iflist list.

Whilst here, also:

- Remove the unnecessary "bp->bif_ifp == NULL" check, as a bpf_if should never
  exist in the list with a NULL ifnet pointer.

- Except when INVARIANTS is in the kernel config, silently ignore the case where
  no bpf_if referencing the specified ifnet is found, as it is harmless and does
  not require user attention.

Reviewed by: csjp

git-svn-id: svn://svn.freebsd.org/base/stable/8@230416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230294:
lstewart [Sat, 21 Jan 2012 03:46:58 +0000 (03:46 +0000)]
MFC r230294:

Specify the correct section (4 instead of 9) in the h_ertt man page's title and
bump the document date.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230414 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222286 (originally committed by ru):
lstewart [Sat, 21 Jan 2012 03:44:51 +0000 (03:44 +0000)]
MFC r222286 (originally committed by ru):

[mdoc] Fixed .Dt call.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227124: fifo_misc test: Fix swapped lseek arguments.
jilles [Fri, 20 Jan 2012 16:31:44 +0000 (16:31 +0000)]
MFC r227124: fifo_misc test: Fix swapped lseek arguments.

It worked regardless because SEEK_CUR happens to be 1.

PR: misc/160866

git-svn-id: svn://svn.freebsd.org/base/stable/8@230385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227123: lint: Fix lseek() argument order.
jilles [Fri, 20 Jan 2012 15:44:39 +0000 (15:44 +0000)]
MFC r227123: lint: Fix lseek() argument order.

Because SEEK_SET is 0, this seems to have no effect on the generated code.

PR: bin/160806
Submitted by: Henning Petersen <henning dot petersen at t-online dot de>
Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@230382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r216269:
emaste [Fri, 20 Jan 2012 00:20:00 +0000 (00:20 +0000)]
MFC r216269:

  Don't warn if a partition appears not to be aligned on a track boundary.
  Modern disks use LBA and create a fake CHS geometry that doesn't have any
  relation to the on-disk layout of data.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 229965
gnn [Thu, 19 Jan 2012 19:39:41 +0000 (19:39 +0000)]
MFC: 229965

Fix for PR 138526.

Add the ability for /dev/null and /dev/zero to accept
being set into non blocking mode via fcntl().  This
brings the code into compliance with IEEE Std 1003.1-2001
as referenced in another PR, 94729.

Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@230335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r229977
brueffer [Wed, 18 Jan 2012 22:08:26 +0000 (22:08 +0000)]
MFC: r229977

Add hpt27xx to the hardware notes,

While here, add the 2012 copyright.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r229984
truckman [Wed, 18 Jan 2012 21:50:59 +0000 (21:50 +0000)]
MFC: r229984

Pass the arguments to mtx_init() in the correct order.  There should be
no change to the binary because the value of MTX_DEF is zero and there
is a visible function prototype.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226430:
stefanf [Wed, 18 Jan 2012 18:22:25 +0000 (18:22 +0000)]
MFC r226430:
Adjust posix_memalign() prototype to match what we define in stdlib.h for
C++ compilation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230032, r230050, r230090, r230091 and r228493.
hselasky [Wed, 18 Jan 2012 07:56:13 +0000 (07:56 +0000)]
MFC r230032, r230050, r230090, r230091 and r228493.
- Various XHCI and USB 3.0 related issues.
- USB 3.0 HUBs should work after this change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229971:
kib [Wed, 18 Jan 2012 05:38:43 +0000 (05:38 +0000)]
MFC r229971:
Add PCI Id for the AMT SOL UART on 5 series Intel chipsets.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225048:
bz [Tue, 17 Jan 2012 22:08:58 +0000 (22:08 +0000)]
MFC r225048:

 In this branch when doing no further checkes there is no reason use
 the temporary variable and check with if as TUNABLE_*_FETCH do not
 alter values unless successfully found the tunable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224516:
bz [Tue, 17 Jan 2012 22:02:11 +0000 (22:02 +0000)]
MFC r224516:

 Introduce a tunable to disable the time consuming parts of bootup
 memtesting, which can easily save seconds to minutes of boot time.
 The tunable name is kept general to allow reusing the code in
 alternate frameworks.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r201402 (by ed):
pluknet [Tue, 17 Jan 2012 18:54:50 +0000 (18:54 +0000)]
MFC r201402 (by ed):
 Don't forget to clean up the file copied from the kernel sources.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFhead r226367:
glebius [Tue, 17 Jan 2012 18:05:13 +0000 (18:05 +0000)]
MFhead r226367:

  Never switch directly from INIT to MASTER, since this produces
  nasty status flaps.

  PR: kern/161123
  Submitted by: Damien Fleuriot <dam my.gd>
  OpenBSD: ip_carp.c, rev. 1.115

git-svn-id: svn://svn.freebsd.org/base/stable/8@230271 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229416 + 223200:
delphij [Tue, 17 Jan 2012 01:28:43 +0000 (01:28 +0000)]
MFC 229416 + 223200:

Don't forget to release queue lock when allocation of memory failed.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly

git-svn-id: svn://svn.freebsd.org/base/stable/8@230253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229886:
jimharris [Tue, 17 Jan 2012 00:02:45 +0000 (00:02 +0000)]
MFC r229886:

 Add support for >2TB disks in GEOM RAID for Intel metadata format.

Sponsored by: Intel
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/8@230245 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRevert r229671 mergeinfo property from root directory. This was mistakenly
jimharris [Mon, 16 Jan 2012 23:02:37 +0000 (23:02 +0000)]
Revert r229671 mergeinfo property from root directory.  This was mistakenly
added as part of r230224 MFC commit.

Reviewed by: avg
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/8@230241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228060, r228068, r228060
bapt [Mon, 16 Jan 2012 22:26:45 +0000 (22:26 +0000)]
MFC r228060, r228068, r228060

Upgrade gperf to 3.0.3 latest GPLv2 version

Approved by:    des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229671:
jimharris [Mon, 16 Jan 2012 17:31:26 +0000 (17:31 +0000)]
MFC r229671:

 Add 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode.

Sponsored by: Intel
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/8@230224 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoFix build breakage by adding missing mb_put_padbyte()
kevlo [Mon, 16 Jan 2012 14:40:22 +0000 (14:40 +0000)]
Fix build breakage by adding missing mb_put_padbyte()

git-svn-id: svn://svn.freebsd.org/base/stable/8@230217 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228864:
kevlo [Mon, 16 Jan 2012 08:31:32 +0000 (08:31 +0000)]
MFC r228864:
Discard local array based on return values.

Pointed out by: uqs
Found with: Coverity Prevent(tm)
CID: 10089

MFC 228023:
Add unicode support to ntfs

Obtained from: imura

git-svn-id: svn://svn.freebsd.org/base/stable/8@230206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228796:
kevlo [Mon, 16 Jan 2012 08:29:52 +0000 (08:29 +0000)]
MFC r228796:
Discarding local array based on return values.

MFC r227650:
Add unicode support to msdosfs and smbfs; original pathes from imura,
bug fixes by Kuan-Chung Chiu <buganini at gmail dot com>.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230205 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228718: ule: ensure that batch timeshare threads are scheduled
avg [Sun, 15 Jan 2012 22:47:49 +0000 (22:47 +0000)]
MFC r228718: ule: ensure that batch timeshare threads are scheduled
fairly

Second take.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRevert r230174, a botched MFC
avg [Sun, 15 Jan 2012 22:43:34 +0000 (22:43 +0000)]
Revert r230174, a botched MFC

This is a direct commit to the branch for obvious reasons.

Pointyhat to: avg

git-svn-id: svn://svn.freebsd.org/base/stable/8@230177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228265: critical_exit: ignore td_owepreempt if kdb_active is set
avg [Sun, 15 Jan 2012 22:23:41 +0000 (22:23 +0000)]
MFC r228265: critical_exit: ignore td_owepreempt if kdb_active is set

git-svn-id: svn://svn.freebsd.org/base/stable/8@230176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228718: ule: ensure that batch timeshare threads are scheduled
avg [Sun, 15 Jan 2012 22:18:54 +0000 (22:18 +0000)]
MFC r228718: ule: ensure that batch timeshare threads are scheduled
fairly

git-svn-id: svn://svn.freebsd.org/base/stable/8@230174 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228710: opensolaris compat: fix vcmn_err so that panic(9) produces
avg [Sun, 15 Jan 2012 22:08:44 +0000 (22:08 +0000)]
MFC r228710: opensolaris compat: fix vcmn_err so that panic(9) produces
a proper message

git-svn-id: svn://svn.freebsd.org/base/stable/8@230172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228426: syscons: make sc_puts static as it is used only privately
avg [Sun, 15 Jan 2012 22:05:15 +0000 (22:05 +0000)]
MFC r228426: syscons: make sc_puts static as it is used only privately

git-svn-id: svn://svn.freebsd.org/base/stable/8@230170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228433: put sys/systm.h at its proper place or add it if missing
avg [Sun, 15 Jan 2012 22:02:35 +0000 (22:02 +0000)]
MFC r228433: put sys/systm.h at its proper place or add it if missing

git-svn-id: svn://svn.freebsd.org/base/stable/8@230168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228267: zfsboot: print boot.config contents before parsing it
avg [Sun, 15 Jan 2012 21:52:45 +0000 (21:52 +0000)]
MFC r228267: zfsboot: print boot.config contents before parsing it

git-svn-id: svn://svn.freebsd.org/base/stable/8@230166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228266: zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)
avg [Sun, 15 Jan 2012 21:50:17 +0000 (21:50 +0000)]
MFC r228266: zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)

git-svn-id: svn://svn.freebsd.org/base/stable/8@230164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225530: gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1
avg [Sun, 15 Jan 2012 21:43:24 +0000 (21:43 +0000)]
MFC r225530: gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1

git-svn-id: svn://svn.freebsd.org/base/stable/8@230162 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228343:
eadler [Sun, 15 Jan 2012 20:52:31 +0000 (20:52 +0000)]
MFC r228343:
 - Fix ktrace leakage if error is set

PR: kern/163098
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/8@230159 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229766:
ume [Sat, 14 Jan 2012 19:22:45 +0000 (19:22 +0000)]
MFC r229766:
  Handle the internal scope address representation of the KAME IPv6
  stack for the node-local multicast address.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230112 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r228463, that explicily uses 255.0.0.0 mask for the temporary prefix.
glebius [Fri, 13 Jan 2012 23:25:58 +0000 (23:25 +0000)]
Merge r228463, that explicily uses 255.0.0.0 mask for the temporary prefix.
This change isn't actually needed in the stable/8, but let it be here, in
case if anyone tries to run stable/8 world on a head/ kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 221891,229665,229672,229700:
jhb [Fri, 13 Jan 2012 20:35:43 +0000 (20:35 +0000)]
MFC 221891,229665,229672,229700:
Remove the assertion from tcp_input() that rcv_nxt is always greater
than or equal to rcv_adv and fix tcp_twstart() to handle this case by
assuming the last window was zero rather than a negative value.

The code in tcp_input() already safely handled this case.  It can happen
due to delayed ACKs along with a remote sender that sends data beyond
the window we previously advertised.  If we have room in our socket buffer
for the extra data beyond the advertised window, we will accept it.
However, if the ACK for that segment is delayed, then we will not
effectively fixup rcv_adv to account for that extra data until the
next segment arrives and forces out an ACK.  When that next segment
arrives, rcv_nxt will be beyond rcv_adv.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 228960:
jhb [Fri, 13 Jan 2012 20:25:56 +0000 (20:25 +0000)]
MFC 228960:
Cap the priority calculated from the current thread's running tick count
at SCHED_PRI_RANGE to prevent overflows in the priority value.  This can
happen due to irregularities with clock interrupts under certain
virtualization environments.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229519:
jhb [Fri, 13 Jan 2012 20:23:18 +0000 (20:23 +0000)]
MFC 229519:
Fix 'make clean' for this module so it cleans up the generated gssd.h.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229429:
jhb [Fri, 13 Jan 2012 20:15:49 +0000 (20:15 +0000)]
MFC 229429:
Some small fixes to CPU accounting for threads:
- Only initialize the per-cpu switchticks and switchtime in sched_throw()
  for the very first context switch on APs during boot.  This avoids a
  small gap between the middle of thread_exit() and sched_throw() where
  time is not accounted to any thread.
- In thread_exit(), update the timestamp bookkeeping to track the changes
  to mi_switch() introduced by td_rux so that the code once again matches
  the comment claiming it is mimicing mi_switch().  Specifically, only
  update the per-thread stats directly and depend on ruxagg() to update
  p_rux rather than adjusting p_rux directly.  While here, move the
  timestamp bookkeeping as late in the function as possible.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229390,229420,229479:
jhb [Fri, 13 Jan 2012 19:51:15 +0000 (19:51 +0000)]
MFC 229390,229420,229479:
Fix some races in the multicast code by removing places where we would
drop the IF_ADDR_LOCK while walking an interface's multicast address list:
- Use TAILQ_FOREACH() instead of TAILQ_FOREACH_SAFE() for some loops that
  do not modify the queues they iterate over.
- When cancelling multicast timers on an interface, don't release the
  reference on a group in the leaving state while iterating over the loop.
  Instead, use the same approach used in igmp_ifdetach() and mld_ifdetach()
  of placing the groups to free on a pending release list and then releasing
  the references after dropping the IF_ADDR_LOCK.
- Use the mli_relinmhead list normally used to defer calls to
  in6m_release_locked() to defer calls to mld_v1_transmit_report() until
  after the IF_ADDR_LOCK is dropped.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230077 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229414,229476,229477:
jhb [Fri, 13 Jan 2012 19:20:33 +0000 (19:20 +0000)]
MFC 229414,229476,229477:
Various fixes to the SIOC[DG]LIFADDR ioctl handlers:
- Grab a reference on any matching interface address (ifa) before dropping
  the IF_ADDR_LOCK() and release the reference after using it to prevent a
  potential use-after-free.
- Fix the IPv4 ioctl handlers in in_lifaddr_ioctl() to work with IPv4
  interface addresses rather than IPv6.
- Add missing interface address list locking in the IPv4 handlers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 215605,215606,222952,229400:
jhb [Fri, 13 Jan 2012 19:13:43 +0000 (19:13 +0000)]
MFC 215605,215606,222952,229400:
Various improvements to the 'cscope' target:
- Add x86 to ALL_ARCH.
- Add lex and yacc sources to things cscope'd.
- Include sys/xen in cscope tag file generation.
- Improve the cscope target's handling of MD directories.  Automatically
  include the MACHINE_ARCH directory if it differs from MACHINE when
  building an index for a single machine.  Also, include the 'x86'
  directory when building an index for i386, pc98, or amd64.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230073 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229622:
jhb [Fri, 13 Jan 2012 18:58:31 +0000 (18:58 +0000)]
MFC 229622:
Fix a logic bug in change 228207 in the check for a thread's new user
priority being a realtime priority.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 228849, 229727:
jhb [Fri, 13 Jan 2012 18:54:10 +0000 (18:54 +0000)]
MFC 228849, 229727:
Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use
these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended
attributes of a vnode are changed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@230068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f