Close a minor deadlock.

MFC after:	1 week
Print the ktr(4) format line that caused a failure.

Sponsored by:	Nginx, Inc.
zdb -R: do not treat numeric parameters to a flag as more flags

Reviewed by:	Matthew Ahrens <mahrens@delphix.com>
MFC after:	1 week
traverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECT

This is done to ensure that visited object IDs are always increasing.
Also, pass correct object ID to prefetch_dnode_metadata for
os_groupused_dnode.

Without this change we would hit an assert if traversal was paused on
a GROUPUSED object, which is unlikely but possible.

Apparently the same change was independently developed by Deplhix.

Reviewed by:	Matthew Ahrens <mahrens@delphix.com>
MFC after:	10 days
Sponsored by:	HybridCluster
Fix a possible memory use after free and leak situation associated
with USB device detach when using character device handles. This also
includes LibUSB. It turns out that "usb_close()" cannot always get a
reference to clean up its USB transfers and such, if called during the
kernel USB device detach.

Analysis by:	hselasky @
Reported by:	Juergen Lock <nox@jelal.kn-bremen.de>
MFC after:	1 week
Fix comment.
Add ID for one more ASMedia AHCI-compatible controller.

Reported by:	ignace.peeters@gmail.com
MFC after:	2 weeks
gcc: Drop useless objc change from r260311.

Among some of the objc changes from Apple that crept into r260311,
Radar 5355344 is incomplete and is not used since we don't carry
ObjC in the base system.

The dead code seems to have caused issues in some Tinderboxes so
get rid of it altogether.

Reported by:	luigi
MFC after:	9 days
Bring back r226403, the fix for bin/161526, which was (accidentally?)
reverted in r238896.

PR:		bin/161526
Reported by:	Karli.Sjoberg slu.se
MFC after:	3 days
MFV r260834:

Fix memory leak of compressed buffers in l2arc_write_done (Illumos
#3995).
If the guest exits due to a fault while it is executing IRET then restore
the state of "Virtual NMI blocking" in the guest's interruptibility-state
field before resuming the guest.
For ia64, add _bswapsi2 & _bswapdi2. The audio/flac port uses the
bswap32 builtin and the compiler emits a call to the libgcc function
rather than generating inline code.
Add very simple virtio_random(4) driver to harvest entropy from host

Reviewed by:	markm (random bits only)
Replace LIBGCC by LIBCOMPILER_RT.

We now use libcompiler_rt on all platforms now. Instead of referring
directly to -lgcc and LIBGCC, use -lcompiler_rt and LIBCOMPILER_RT.
Correct value of LIBCOMPILER_RT.

Caught by:	Luca Bayer
Split in6_update_ifa() into smaller pieces leaving functionality intact.

Discussed with:	ae
MFC after:	2 weeks
Do some style(9) not done in r260851 to improve readability.

MFC after:	2 weeks
Style changes in vm_pageout_scan():

1. Be consistent in the style of "act_delta" manipulations between the
   inactive and active queue scans.

2. Explicitly compare to zero.

3. The deactivation of a page is based is based on its recent history
   and not just the current call to vm_pageout_scan().  The variable
   "act_delta" represents the current state of the page, and not its
   history.  Avoid possible confusion by not (ab)using "act_delta" for
   the making the deactivation decision.

Submitted by:	kib [1]
Reviewed by:	kib [2,3]
Add in6_prepare_ifra() function to ease preparing in-kernel IPv6
address requests.

MFC after:	2 weeks
Use in6_localip() instead of hand-rolled cycle.

MFC after:	2 weeks