Handle value -> NULL gracefully like NetBSD does

Sponsored-by: EMC Isilon
Revert accidental commits to contrib/wpa via b0139366ad6a3b437eaad0bc1c1816382b70b86c
MFC r254265:
 Make sure bootonly.iso for -BETAs and -RCs use the releases/
 directory on the FTP mirrors to fetch distributions, since
 these are always pushed to releases/ during the release cycle.
MFC r254092:
  Make the check for number of entries less strict.
  Some partitioning tools can create GPT with number of entries less
  than 128.
MFC r254008 Make the fallback from MSIX to MSI interrupt usage more graceful.
MFC r254262  Further improve the msix setup, make sure pci_alloc_msix() gives us
             the vectors we requested, and fall back to MSI when not, also release
             any allocated resources before the fallback.
MFC r254264  Make the igb_mq_start() routine use TRYLOCK rather than simple
             queuing, there were latency and other problems with the latter.
MFC r239347, 240295, 240296 and 253325:

    r239347 | davidxu | 2012-08-17 10:26:31 +0800 (Fri, 17 Aug 2012) | 7 lines

    Implement syscall clock_getcpuclockid2, so we can get a clock id
    for process, thread or others we want to support.
    Use the syscall to implement POSIX API clock_getcpuclock and
    pthread_getcpuclockid.

    PR:	168417

    ------------------------------------------------------------------------
    r240295 | davidxu | 2012-09-10 13:00:29 +0800 (Mon, 10 Sep 2012) | 2 lines

    Add missing prototype for clock_getcpuclockid.

    ------------------------------------------------------------------------
    r240296 | davidxu | 2012-09-10 13:09:39 +0800 (Mon, 10 Sep 2012) | 2 lines

    Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME.

    ------------------------------------------------------------------------
    r253325 | kib | 2013-07-14 03:32:50 +0800 (Sun, 14 Jul 2013) | 6 lines

    Allow to call clock_gettime() on the clock id for zombie process.

    Reported by:	Petr Salinger <Petr.Salinger@seznam.cz>
    PR:	threads/180496
    Sponsored by:	The FreeBSD Foundation
Regen.
MFC 253983, 253984:

  Update Bind to 9.8.5-P2

  New Features

     Adds a new configuration option, "check-spf"; valid values are
     "warn" (default) and "ignore".  When set to "warn", checks SPF
     and TXT records in spf format, warning if either resource record
     type occurs without a corresponding record of the other resource
     record type.  [RT #33355]

     Adds support for Uniform Resource Identifier (URI) resource
     records. [RT #23386]

     Adds support for the EUI48 and EUI64 RR types. [RT #33082]

     Adds support for the RFC 6742 ILNP record types (NID, LP, L32,
     and L64). [RT #31836]

  Feature Changes

     Changes timing of when slave zones send NOTIFY messages after
     loading a new copy of the zone.  They now send the NOTIFY before
     writing the zone data to disk.  This will result in quicker
     propagation of updates in multi-level server structures. [RT #27242]
     "named -V" can now report a source ID string.  (This is will be
     of most interest to developers and troubleshooters).  The source

     ID for ISC's production versions of BIND is defined in the "srcid"
     file in the build tree and is normally set to the most recent
     git hash. [RT #31494]

     Response Policy Zone performance enhancements.  New "response-policy"
     option "min-ns-dots".  "nsip" and "nsdname" now enabled by default
     with RPZ. [RT #32251]

Approved by:  delphij (mentor)
Sponsored by: DK Hostmaster A/S
MFC r254191:
Match malloc(9) calls with free(9), not contigfree(9).
MFC r253969:
Do not override the ENOENT error for the empty path, or EFAULT errors
from copyins, with the relative lookup check.
Fix the mismerge in r254444, use '==' instead of '='.

Pointed out by:	jilles, John Wehle <john@feith.com>
MFC r239960:

  Properly enable Clang-style atomics when available.

  In addition to testing against cxx_atomic, we must check c_atomic. The
  former is only set when building C++ code. Also use __has_extension
  instead of __has_feature. This allows us to use the atomics outside of
  C11.

PR:	threads/170073
MFC r240970:

  - Make C11 atomic macros usable in expressions:
    - Replace do-while statements with void expressions.
    - Wrap __asm statements in statement expressions.
  - Make the macros function-like:
    - Evaluate all arguments exactly once.
    - Make sure there's a sequence point between evaluation of the
      arguments and the function body. Arguments should be evaluated
      before any memory barriers.
  - Fix use of __atomic_is_lock_free built-in. It requires the address
    of an atomic variable as second argument. Use this built-in on clang
    as well because clang's __c11_atomic_is_lock_free only takes the size
    of the variable into account.
  - In atomic_exchange_explicit put the barrier before instead of after
    the __sync_lock_test_and_set call.
MFC r251192: Fix misspelling of structure field name.
MFC a bundle of commits that bring autotuning to mbufs, maxfiles/sockets
and maxusers to the 9-stable branch.  It is committed as bundle because
these patches build on each other and only provide the functionality in
their entirety.  Some are bug fixes to aspects of earlier commits.

MFC r242029 (alfred):

 Allow autotune maxusers > 384 on 64 bit machines.

MFC r242847 (alfred):

 Allow maxusers to scale on machines with large address space.

MFC r243631 (andre):

 Base the mbuf related limits on the available physical memory or
 kernel memory, whichever is lower.  The overall mbuf related memory
 limit must be set so that mbufs (and clusters of various sizes)
 can't exhaust physical RAM or KVM.

 At the same time divorce maxfiles from maxusers and set maxfiles to
 physpages / 8 with a floor based on maxusers.  This way busy servers
 can make use of the significantly increased mbuf limits with a much
 larger number of open sockets.

MFC r243639 (andre):

 Complete r243631 by applying the remainder of kern_mbuf.c that got
 lost while merging into the commit tree.

MFC r243668 (andre):

 Using a long is the wrong type to represent the realmem and maxmbufmem
 variable as they may overflow on i386/PAE and i386 with > 2GB RAM.

MFC r243995, r243996, r243997 (pjd):

 Style cleanups, Make use of the fact that uma_zone_set_max(9) already
 returns actual limit set.

MFC r244080 (andre):

 Prevent long type overflow of realmem calculation on ILP32 by forcing
 calculation to be in quad_t space.  Fix style issue with second parameter
 to qmin().

MFC r245469 (alfred):

 Do not autotune ncallout to be greater than 18508.

MFC r245575 (andre):

 Move the mbuf memory limit calculations from init_param2() to
 tunable_mbinit() where it is next to where it is used later.

MFC r246207 (andre):

 Remove unused VM_MAX_AUTOTUNE_NMBCLUSTERS define.

MFC r249843 (andre):

 Base the calculation of maxmbufmem in part on kmem_map size
 instead of kernel_map size to prevent kernel memory exhaustion
 by mbufs and a subsequent panic on physical page allocation
 failure.

MFC r253204 (andre):

 Fix style issues, a typo in "kern.ipc.nmbufs" and correctly plave and
 expose the value of the tunable maxmbufmem as "kern.ipc.maxmbufmem"
 through sysctl.

MFC r253207 (andre):

 Make use of the fact that uma_zone_set_max(9) already returns the
 rounded limit making a call to uma_zone_get_max(9) unnecessary.

Tested by:	alfred (iXsystems)
MFC r254525:
 Add entry for packages-9.2-release directory.

Approved by:	re (implicit)
MFC r254397:
  Mark the makefs(8) '-p' flag as deprecated in preference for
  the '-Z' flag for compatibility with NetBSD.
MFC r253967:
Wait for the doomed vnode to be detached from the tmpfs
node if sleepable allocation is requested.