Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.
This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.


git-svn-id: svn://svn.freebsd.org/base/head@247863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix stack alignment in the kernel to be on an 8 byte boundary as required
by AAPCS.


git-svn-id: svn://svn.freebsd.org/base/head@247864 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Reorder code to avoid the stat buffer being used uninitialized.

Obtained from:	NetApp


git-svn-id: svn://svn.freebsd.org/base/head@247865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove the virtio dependency entry for the VirtIO device drivers. This
will prevent the kernel from linking if the device driver are included
without the virtio module. Remove pci and scbus for the same reason.

Also explain the relationship and necessity of the virtio and virtio_pci
modules. Currently in FreeBSD, we only support VirtIO PCI, but it could
be replaced with a different interface (like MMIO) and the device
(network, block, etc) will still function.

Requested by:	luigi
Approved by:	grehan (mentor)
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@247870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Simplify virtio ring num-available calculation.

Submitted by:	Chris Torek, torek at torek dot net


git-svn-id: svn://svn.freebsd.org/base/head@247871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update driver to version 4.6.95.0.

Submitted by:	"Duvvuru,Venkat Kumar" <VenkatKumar.Duvvuru Emulex.Com>
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@247880 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix 'make depend'


git-svn-id: svn://svn.freebsd.org/base/head@247891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Explicitly disable lastlog, utmp and wtmp.


git-svn-id: svn://svn.freebsd.org/base/head@247892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Forced commit to note that this file had not been regenerated since 5.8
due to issues with the configure script incorrectly detecting utmp and
lastlog despite the fact that FreeBSD 10 does not have them any more.


git-svn-id: svn://svn.freebsd.org/base/head@247893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix time math overflows and improve zero intervals handling in poll(),
select(), nanosleep() and kevent() functions after calloutng changes.

Reported by:	bde


git-svn-id: svn://svn.freebsd.org/base/head@247898 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Create a symlink from strchrnul.3 to strchr.3.
This was forgotten in the initial commit of strchrnul()

Approved by:	theraven


git-svn-id: svn://svn.freebsd.org/base/head@247899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Reduce minimal time intervals of setitimer(2) from 1/HZ to 1/(16*HZ) by
using callout_reset_sbt() instead of callout_reset().  We can't remove
lower limit completely in this case because of significant processing
overhead, caused by unability to use direct callout execution due to using
process mutex in callout handler for sending SEGALRM signal.  With support
of periodic events that would allow unprivileged user to abuse the system.

Reviewed by:	davide


git-svn-id: svn://svn.freebsd.org/base/head@247903 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove strnvis(), strvis(), strvisx().


git-svn-id: svn://svn.freebsd.org/base/head@247904 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Call sched_prio() to immediately change the priority of the thread in
response to an rtprio_thread() call, when the priority is different
than the old priority, and either the old or the new priority class is
not RTP_PRIO_NORMAL (timeshare).

The reasoning for the second half of the test is that if it's a change in
timeshare priority, then the scheduler is going to adjust that priority
in a way that completely wipes out the requested change anyway, so
what's the point?  (If that's not true, then allowing a thread to change
its own timeshare priority would subvert the scheduler's adjustments and
let a cpu-bound thread monopolize the cpu; if allowed at all, that
should require priveleges.)

On the other hand, if either the old or new priority class is not
timeshare, then the scheduler doesn't make automatic adjustments, so we
should honor the request and make the priority change right away.  The
reason the old class gets caught up in this is the very reason for this
change:  when thread A changes the priority of its child thread B from
idle back to timeshare, thread B never actually gets moved to a
timeshare-range run queue unless there are some idle cycles available
to allow it to first get scheduled again as an idle thread.

Reviewed by:	jhb@


git-svn-id: svn://svn.freebsd.org/base/head@247905 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The hashmask returned by hashinit() is a valid index in the returned hash array.
Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.

MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@247906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'