Fix iconv(3) NULL pointer dereference and out-of-bounds array
access. [SA-14:15]

Fix multiple vulnerabilities in file(1) and libmagic(3).
[SA-14:16]

Worked around bug with PCID implementation. [EN-14:07]

Security:	CVE-2014-3951
Security:	FreeBSD-SA-14:15.iconv
Security:	CVE-2013-7345, CVE-2014-1943, CVE-2014-2270
Security:	FreeBSD-SA-14:16.file
Approved by:	so
Cherry-picked from HEAD:

Decrease lock contention within the TCP accept case by removing
the INP_INFO lock from tcp_usr_accept.  As the PR/patch states
this was following the advice already in the code.
See the PR below for a full disucssion of this change and its
measured effects.

PR:		183659
Submitted by:	Julian Charbon
Reviewed by:	jhb
Cherry-picked from HEAD:

Notes:
    svn path=/head/; revision=264321

Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Submitted by:	Julien Charbon <jcharbon@verisign.com>
Reviewed by:	rwatson, rrs, adrian
MFC after:	2 months
Cherry-picked from HEAD:

Notes:
    svn path=/head/; revision=264342

Don't leak the TCP pcbinfo lock if a time wait connection is closed
in between grabbing a reference on the connection structure and obtaining
the pcbinfo lock.

Reviewed by:	Julien Charbon
Cherry-picked from HEAD:

Notes:
    svn path=/head/; revision=264351

The tw_pcbrele() function does not need the global timewait lock.

Submitted by:	Julien Charbon
Suggested by:	glebius
Cherry-picked from HEAD:

Notes:
    svn path=/head/; revision=264356

Some whitespace and style fixes.

Submitted by:	bde
[tcp-scaling] Don't take INP_INFO lock when receiving SYNs hitting listening sockets

Mike's review:
 - Simplify the locking logic
 - Fix tcp_input() comment
[tcp-scaling] Introduce the INP_LIST global mutex for protecting pcbinfo global structures

Julien's review:
 - Fixing comments
[beta][tcp-scaling] Use INP_INFO_RLOCK in critical path, and use INP_INFO_WLOCK in full INP loops.

Julien's review:
 o Fix INP_INFO_{W,R}LOCK assertions
 o TIME_WAIT changes:
  - Deprecate using of tw reference counting
  - Fix a tw leak in tcp_tw_2msl_reuse()
  - Check tw->cred != NULL