]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r291348:
bdrewery [Fri, 4 Dec 2015 19:16:56 +0000 (19:16 +0000)]
MFC r291348:

  Use LIBEXECDIR for /usr/libexec.

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

8 years agoMFC r291339:
bdrewery [Fri, 4 Dec 2015 19:15:36 +0000 (19:15 +0000)]
MFC r291339:

  Follow-up r291330: h_testbits.h is only needed by xdr_test.

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

8 years agoMFC r291331:
bdrewery [Fri, 4 Dec 2015 19:14:14 +0000 (19:14 +0000)]
MFC r291331:

  Avoid requiring 'make depend' here.

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

8 years agoMFC r291330:
bdrewery [Fri, 4 Dec 2015 19:04:04 +0000 (19:04 +0000)]
MFC r291330:

  Replace DPSRCS that work fine in SRCS.

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

8 years agoMFC r284289,r288267:
bdrewery [Fri, 4 Dec 2015 18:59:20 +0000 (18:59 +0000)]
MFC r284289,r288267:

  r284289:
    Misc fixes from projects/bmake
  r288267:
    Remove redundant .NOPATH.

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

8 years agoMFC r291329:
bdrewery [Fri, 4 Dec 2015 18:50:12 +0000 (18:50 +0000)]
MFC r291329:

  Remove redundant DPSRCS which were already in SRCS.

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

8 years agoMFC r291026:
bdrewery [Fri, 4 Dec 2015 18:48:08 +0000 (18:48 +0000)]
MFC r291026:

  Remove unneeded libmd from bootstrap-tools (reverting r246784).

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

8 years agoMFC r290665:
bdrewery [Fri, 4 Dec 2015 18:44:12 +0000 (18:44 +0000)]
MFC r290665:

  Build all of sys/modules with SUBDIR_PARALLEL.

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

8 years agoMFC r291081:
bdrewery [Fri, 4 Dec 2015 18:39:57 +0000 (18:39 +0000)]
MFC r291081:

  Rename checked-in 'includes' to 'includes.sh' to avoid colliding with
  share/mk target 'make includes'.

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

8 years agoMFC r290812:
bdrewery [Fri, 4 Dec 2015 18:33:32 +0000 (18:33 +0000)]
MFC r290812:

  Avoid setting schg in the objtree for lib32 build.

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

8 years agoMFC r290435:
bdrewery [Fri, 4 Dec 2015 18:32:39 +0000 (18:32 +0000)]
MFC r290435:

  Don't allow environment-set options to bleed into src.conf.5 generation.

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

8 years agoMFC r290431:
bdrewery [Fri, 4 Dec 2015 18:31:19 +0000 (18:31 +0000)]
MFC r290431:

  Add SUBDIR_PARALLEL.

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

8 years agoMFC r290426:
bdrewery [Fri, 4 Dec 2015 18:29:06 +0000 (18:29 +0000)]
MFC r290426:

  Correct a comment which appears to be mistakingly mechanically changed in
  r265420.

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

8 years agoMFC r290170:
bdrewery [Fri, 4 Dec 2015 18:25:55 +0000 (18:25 +0000)]
MFC r290170:

  Remove unneeded NULL as this is initialized with M_ZERO.

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

8 years agoMFC r290169:
bdrewery [Fri, 4 Dec 2015 18:24:47 +0000 (18:24 +0000)]
MFC r290169:

  Use memmove(3) to avoid overlapping copy.

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

8 years agoMFC r290374:
bdrewery [Fri, 4 Dec 2015 18:23:34 +0000 (18:23 +0000)]
MFC r290374:

  Remove unneeded mutex.h include, missed in r287155.

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

8 years agoMFC r290084:
bdrewery [Fri, 4 Dec 2015 18:22:31 +0000 (18:22 +0000)]
MFC r290084:

  Remove unneeded NAME override.

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

8 years agoMFC r290083:
bdrewery [Fri, 4 Dec 2015 18:21:05 +0000 (18:21 +0000)]
MFC r290083:

  Use more appropriate ${SHAREDIR} rather than /usr/share.

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

8 years agoMFC r289393:
bdrewery [Fri, 4 Dec 2015 18:14:31 +0000 (18:14 +0000)]
MFC r289393:

  Add more SUBDIR_PARALLEL.

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

8 years agoMFC r289669:
bdrewery [Fri, 4 Dec 2015 18:09:51 +0000 (18:09 +0000)]
MFC r289669:

  Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL.

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

8 years agoMFC r289289,r290181:
bdrewery [Fri, 4 Dec 2015 18:07:44 +0000 (18:07 +0000)]
MFC r289289,r290181:

  r289289:
    Fix support for building a PROG_CXX, and PROG, directly.
  r290181:
    Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the
    "one of many" targets, e.g. `make hello_world`, where hello_world is a C
    program

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

8 years agoMFC r289286,r291338,r291340:
bdrewery [Fri, 4 Dec 2015 18:06:47 +0000 (18:06 +0000)]
MFC r289286,r291338,r291340:

  r289286:
    Follow-up r288218 by ensuring common objects are built before recursing.
  r291338:
    Fix the "common object" handling to not depend on ".o" if SRCS only
    contains headers.
  r291340:
    Follow-up r291338 to handle .d, .y and .l files better as well.

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

8 years agoMFC r289872:
bdrewery [Fri, 4 Dec 2015 18:04:56 +0000 (18:04 +0000)]
MFC r289872:

  Replace gcc reference with 'cc' and document the default ${CC}.

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

8 years agoMFC r289870,r289871:
bdrewery [Fri, 4 Dec 2015 18:04:09 +0000 (18:04 +0000)]
MFC r289870,r289871:

  r289870:
    Add bsd.crunchgen.mk to bsd.README.
  r289871:
    Sort properly.

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

8 years agoMFC r289736:
bdrewery [Fri, 4 Dec 2015 18:01:11 +0000 (18:01 +0000)]
MFC r289736:

  Document that we use {} for variable expansion.

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

8 years agoMFC r289379:
bdrewery [Fri, 4 Dec 2015 17:59:45 +0000 (17:59 +0000)]
MFC r289379:

  Remove directories disconnected since r169718.

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

8 years agoMFC r289375:
bdrewery [Fri, 4 Dec 2015 17:58:31 +0000 (17:58 +0000)]
MFC r289375:

  Fix wrong use of .for; the iteration variable is not used in the loop.

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

8 years agoMFC r289374:
bdrewery [Fri, 4 Dec 2015 17:57:36 +0000 (17:57 +0000)]
MFC r289374:

  Remove excess .else

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

8 years agoMFC r289360,r289361,r289378,r289430,r289605,r289676:
bdrewery [Fri, 4 Dec 2015 17:56:10 +0000 (17:56 +0000)]
MFC r289360,r289361,r289378,r289430,r289605,r289676:

  r289360:
    Add temporary workaround for .MAKE being applied to _worldtmp, since
    r251750.
  r289361:
    Consider top-level targets to be .PHONY as bmake won't build them otherwise
    if a file with the same name is found in the directory.
  r289378:
    Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build
    properly.
  r289430:
    Remove .MAKE from targets that do more than just run sub-makes, such as
    calling rm or mtree.
  r289605:
    Add missing .PHONY for parallel subdir target.
  r289676:
    Add some missing '+', .MAKE, and .PHONY modifiers.

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

8 years agoMFC r284105,r284106,r284163:
bdrewery [Fri, 4 Dec 2015 17:36:35 +0000 (17:36 +0000)]
MFC r284105,r284106,r284163:

  r284105:
    Cleanup some indentation issues.
  r284106:
    Implement '-s' to copy as symlink, similar to the current -l link(2)
    handling.
  r284163:
    Cleanup some style(9) issues.

Relnotes: yes

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

8 years agoMFC r291001:
bdrewery [Fri, 4 Dec 2015 17:33:33 +0000 (17:33 +0000)]
MFC r291001:

  ipfw: Fix dynamic IPv6 rules showing junk for non-specified address masks.

Relnotes: yes

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

8 years agoMFH (r287917, r287918, r289063): upgrade to latest Unbound
des [Fri, 4 Dec 2015 13:26:12 +0000 (13:26 +0000)]
MFH (r287917, r287918, r289063): upgrade to latest Unbound
MFH (r283301, r289592, r291582): rc script improvements
MFH (r287880): respect manually configured forwarders when using DHCP
MFH (r289321): deconfuse man page

PR: 184047 203580 204931

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

8 years agoMFC r290913,r291181:
ngie [Fri, 4 Dec 2015 09:32:03 +0000 (09:32 +0000)]
MFC r290913,r291181:

r290913:

Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD

- Add missing headers
- Ensure mqueuefs is loaded
- Make sure the mqueuefs path is absolute and relative to /
- Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler
  warning

Sponsored by: EMC / Isilon Storage Division

r291181:

Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
suite as tests/sys/kern/mqueue_test

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

8 years agoMFC r291180:
ngie [Fri, 4 Dec 2015 09:29:47 +0000 (09:29 +0000)]
MFC r291180:

Fix up convert.c generation

- Use a temporary file for convert.c to reduce likelihood of an interrupted
  build resulting in bad code being written to convert.c
- Truncate the file instead of appending to it to ensure that the file being
  touched will not result in duplicate declarations/definitions from
  kern_acct.c if/when kern_acct.c changes.

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

8 years agoMFC r291359,r291362:
ngie [Fri, 4 Dec 2015 09:25:13 +0000 (09:25 +0000)]
MFC r291359,r291362:

r291359:

Skip over lines that start with # (comments)

r291362:

r291359 was incorrect. Skip over tokens that start with `#' as fgetln can
return more than one '\n' delimited line in a buffer

Handle empty lines too, just in case

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

8 years agoMFC r291363:
ngie [Fri, 4 Dec 2015 09:18:12 +0000 (09:18 +0000)]
MFC r291363:

Clean up trailing whitespace

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

8 years agoMFC r291358:
ngie [Fri, 4 Dec 2015 09:10:49 +0000 (09:10 +0000)]
MFC r291358:

Remove cnftp.bjpu.edu.cn (it no longer resolves)
Add localhost to resolv/mach for parity with nss/mach

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

8 years agoMFC r291379:
kib [Fri, 4 Dec 2015 09:09:19 +0000 (09:09 +0000)]
MFC r291379:
Move the comment about resident pages preventing vnode from leaving
active list, into the header comment for vdrop().

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

8 years agoMFC r284527,r284528,r284608,r285219,r291166,r291167:
ngie [Fri, 4 Dec 2015 09:07:18 +0000 (09:07 +0000)]
MFC r284527,r284528,r284608,r285219,r291166,r291167:

r284527 (by imp):

Update style.9 to reflect consensus on developer's mailing list
allowing redundant braces.

Differential Revision: https://reviews.freebsd.org/D2842

r284528 (by imp):

Bump date.

Submitted by: Xin Li

r284608 (by imp):

Back out contested change until dispute is resolved. This proved to be
more contentious than I expected.

r285219 (by imp):

The results of the vote are in. This reflects that vote. Single
line statements inside of braces is recognized as an acceptable
style.
http://reviews.freebsd.org/V3
As always, this isn't license for wholesale change, etc.

r291166:

Recommend cc -Wall instead of gcc -Wall

r291167:

Bump .Dd

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

8 years agoMerge OpenSSL 1.0.1q.
jkim [Thu, 3 Dec 2015 21:18:48 +0000 (21:18 +0000)]
Merge OpenSSL 1.0.1q.

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

8 years agoFix bad MFC (r291173)
rodrigc [Thu, 3 Dec 2015 18:04:43 +0000 (18:04 +0000)]
Fix bad MFC (r291173)

Replace SRCTOP with the relevant path via .CURDIR

Reviewed by: bdrewery

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

8 years agoMFC r291024:
royger [Thu, 3 Dec 2015 11:05:35 +0000 (11:05 +0000)]
MFC r291024:

xen: fix dropping bitmap IPIs during resume

Sponsored by: Citrix Systems R&D

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

8 years agoMFC: r291035
rmacklem [Wed, 2 Dec 2015 21:48:34 +0000 (21:48 +0000)]
MFC: r291035
The problem report was for a crash that happened when smbfs was
trying to do a mount. Given the backtrace,
it appears that the crash occurred when smb_vc_create() failed and then
called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently
called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash.
This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to
avoid the crash. It also fixes the case in smb_vc_create() where
kproc_create() fails so that it destroys the mutexes and sets
vcp->vc_iod == NULL before free()'ing the iod structure.

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

8 years agoMFC r291301:
fabient [Wed, 2 Dec 2015 17:26:37 +0000 (17:26 +0000)]
MFC r291301:

The r241129 description was wrong that the scenario is possible
 only for read locks on pcbs. The same race can happen with write
 lock semantics as well.

 The race scenario:

 - Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB)
  and do in_pcbref() on it.
 - 1 and 2 both drop the inp hash lock.
 - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(),
  which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()!
 - 1 and 2 congest in INP_WLOCK().
 - 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(),
  which doesn't free the pcb due to two references on it.
  Then it unlocks the pcb.
 - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't
  report inp as freed, due to 2 (or 1) still helding extra reference on it.
  The thread tries to do smth with a disconnected pcb and crashes.

 Submitted by: emeric.poupon@stormshield.eu
 Reviewed by: glebius@
 Sponsored by: Stormshield
 Tested by: Cassiano Peixoto, Stormshield

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

8 years agoRevert MFC of r291023:
royger [Wed, 2 Dec 2015 12:58:20 +0000 (12:58 +0000)]
Revert MFC of r291023:

Due to the delta between HEAD and stable/10 event channel code, this fix is
not needed on stable/10 and was also causing build issues. Revert it.

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

8 years agoMFC r291023:
royger [Wed, 2 Dec 2015 10:26:34 +0000 (10:26 +0000)]
MFC r291023:

xen/intr: properly dispose event channels on resume

Sponsored by: Citrix Systems R&D

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

8 years agoMFC r291022:
royger [Wed, 2 Dec 2015 10:23:54 +0000 (10:23 +0000)]
MFC r291022:

x86/intr: allow mutex recursion in intr_remove_handler

Sponsored by: Citrix Systems R&D

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

8 years agoMFC r269902,r270101:
ngie [Tue, 1 Dec 2015 18:27:38 +0000 (18:27 +0000)]
MFC r269902,r270101:

r269902:

Convert bin/sh/tests to ATF

The new code uses a "test discovery mechanism" to determine
what tests are available for execution

The test shell can be specified via:

  kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh

Sponsored by: EMC / Isilon Storage Division
Approved by: jmmv (mentor)
Reviewed by: jilles (maintainer)

r270101 (by jilles):

sh: Don't hardcode relative paths in the tests stderr files.

These paths have had to be adjusted to changes in the testsuite runner
several times, so modify the tests to remove the need for such adjustment.

A cp in functional_test.sh is now unneeded, but this matters little in
performance.

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

8 years agoMFC r285118:
ngie [Tue, 1 Dec 2015 18:21:25 +0000 (18:21 +0000)]
MFC r285118:
r285118 (by jmmv):

Add missing shebang

Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

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

8 years agoMFC r285140:
ngie [Tue, 1 Dec 2015 18:19:23 +0000 (18:19 +0000)]
MFC r285140:
r285140 (by oshogbo):

Add fdclose(3) function.

This function is equivalent to fclose(3) function except that it
does not close the underlying file descriptor.
fdclose(3) is step forward to make FILE structure private.

Reviewed by: wblock, jilles, jhb, pjd
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D2697

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

8 years agoMFC r278932:
ngie [Tue, 1 Dec 2015 07:32:35 +0000 (07:32 +0000)]
MFC r278932:
r278932 (by pfg):

libc: clean some set-but-not-used errors.

These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.

Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)

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

8 years agoMFC r269326:
ngie [Tue, 1 Dec 2015 07:16:05 +0000 (07:16 +0000)]
MFC r269326:
r269326 (by n_hibma):

Fix the example: free the memory that was allocated by getline().

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

8 years agoMFC: r290970
rmacklem [Tue, 1 Dec 2015 02:30:41 +0000 (02:30 +0000)]
MFC: r290970
mnt_stat.f_iosize (which is used to set bo_bsize) must be set to
the largest size of buffer cache block or the mapping of the buffer
is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize
would be set to 4096. This resulted in corrupted directory data, since
the buffer cache block size for directories is NFS_DIRBLKSIZ (8192).
This patch fixes the code so that it always sets f_iosize to at least
NFS_DIRBLKSIZ.

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

8 years agoMFC r291004:
smh [Tue, 1 Dec 2015 00:53:03 +0000 (00:53 +0000)]
MFC r291004:

Fix early kernel dump via dumpdev env

Sponsored by: Multiplay

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

8 years agoMFC r288153:
smh [Tue, 1 Dec 2015 00:48:31 +0000 (00:48 +0000)]
MFC r288153:

Use kenv 'dumpdev' in the same way as etc/rc.d/dumpon

Sponsored by: Multiplay

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

8 years agoMFC r291143: Update Qlogic 23XX firmware from 3.03.26 to 3.03.28
mav [Mon, 30 Nov 2015 23:00:22 +0000 (23:00 +0000)]
MFC r291143: Update Qlogic 23XX firmware from 3.03.26 to 3.03.28

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

8 years agoMFC r291132: Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.
mav [Mon, 30 Nov 2015 22:59:32 +0000 (22:59 +0000)]
MFC r291132: Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.

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

8 years agoMFC r289755: Remove residual verbosity.
mav [Mon, 30 Nov 2015 22:58:48 +0000 (22:58 +0000)]
MFC r289755: Remove residual verbosity.

firmware_register() already reports errors.

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

8 years agoMFC r291365, r291369: One more round of port scanner rewrite.
mav [Mon, 30 Nov 2015 21:58:51 +0000 (21:58 +0000)]
MFC r291365, r291369: One more round of port scanner rewrite.

 - Make scan aborted by event restart immediately and infinitely.
 - Improve handling of some loop events from firmware.
 - Remove loop down timer, adding its functionality to scanner thread.
 - Some more unification and simplification.

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

8 years agoMFC r291265: Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
mav [Mon, 30 Nov 2015 21:57:54 +0000 (21:57 +0000)]
MFC r291265: Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.

New name better repsents its meaning for modern chips.

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

8 years agoMFC r291221: Remove "disable" hint, which duplicates system-wide "disabled".
mav [Mon, 30 Nov 2015 21:57:16 +0000 (21:57 +0000)]
MFC r291221: Remove "disable" hint, which duplicates system-wide "disabled".

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

8 years agoMFC r291209: Fix target mode support for Qlogic 2200 FC adapters.
mav [Mon, 30 Nov 2015 21:56:31 +0000 (21:56 +0000)]
MFC r291209: Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.

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

8 years agoMFC r291188: Rip off target mode support for parallel SCSI QLogic adapters.
mav [Mon, 30 Nov 2015 21:55:35 +0000 (21:55 +0000)]
MFC r291188: Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work.  And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.

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

8 years agoMFC r290138, r290139: Some updates to isp(4) manual page.
mav [Mon, 30 Nov 2015 21:53:38 +0000 (21:53 +0000)]
MFC r290138, r290139: Some updates to isp(4) manual page.

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

8 years agoMFC r275374: Document ISP 2532 support and hint.isp.0.vports tunable.
mav [Mon, 30 Nov 2015 21:52:19 +0000 (21:52 +0000)]
MFC r275374: Document ISP 2532 support and hint.isp.0.vports tunable.

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

8 years agoMFC r291163:
mav [Mon, 30 Nov 2015 21:47:11 +0000 (21:47 +0000)]
MFC r291163:
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.

While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.

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

8 years agoMFC r291162: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
mav [Mon, 30 Nov 2015 21:46:21 +0000 (21:46 +0000)]
MFC r291162: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.

This makes port scanner fix absent port ID for added initiator.

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

8 years agoMFC r291161: Gracefully stop firmware before resetting chip when changing role.
mav [Mon, 30 Nov 2015 21:45:24 +0000 (21:45 +0000)]
MFC r291161: Gracefully stop firmware before resetting chip when changing role.

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

8 years agoMFC r291160: Add some more asynchronous event status codes.
mav [Mon, 30 Nov 2015 21:44:38 +0000 (21:44 +0000)]
MFC r291160: Add some more asynchronous event status codes.

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

8 years agoMFC r291159: Add more mailbox command codes.
mav [Mon, 30 Nov 2015 21:44:03 +0000 (21:44 +0000)]
MFC r291159: Add more mailbox command codes.

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

8 years agoMFC r291147: Increase maximal value of vports tunable to 254.
mav [Mon, 30 Nov 2015 21:43:20 +0000 (21:43 +0000)]
MFC r291147: Increase maximal value of vports tunable to 254.

I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).

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

8 years agoMFC r291144: Fix target mode with fabric for pre-24xx chips.
mav [Mon, 30 Nov 2015 21:42:35 +0000 (21:42 +0000)]
MFC r291144: Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests.  But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.

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

8 years agoMFC r291099: Some cosmetics for ancient cards.
mav [Mon, 30 Nov 2015 21:41:56 +0000 (21:41 +0000)]
MFC r291099: Some cosmetics for ancient cards.

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

8 years agoMFC r291092: Optimize SNS_GID_FT request scratch memory usage.
mav [Mon, 30 Nov 2015 21:41:06 +0000 (21:41 +0000)]
MFC r291092: Optimize SNS_GID_FT request scratch memory usage.

Now with present 4K of scratch we can fetch up to 508 ports (16 more).

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

8 years agoMFC r291080: Another round of port scanner rewrite.
mav [Mon, 30 Nov 2015 21:40:20 +0000 (21:40 +0000)]
MFC r291080: Another round of port scanner rewrite.

This change simplifies and unifies port adding/updating for loop and
fabric scanners.  It also fixes problems with scanning restarts due to
concurrent port databases changes.  It also fixes many cosmetic issues.

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

8 years agoMFC r291014: Simplify fabric tasting code.
mav [Mon, 30 Nov 2015 21:39:33 +0000 (21:39 +0000)]
MFC r291014: Simplify fabric tasting code.

Except cosmetic changes this removes fabric ports from our port database.
It is always firmware duty to manage them, so driver don't need to worry.

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

8 years agoMFC r291013: Remove some confusions between loopid and nphdl.
mav [Mon, 30 Nov 2015 21:38:51 +0000 (21:38 +0000)]
MFC r291013: Remove some confusions between loopid and nphdl.

Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs.  Leave loopid used only where it really
goes about local loop IDs.

While there, fix few more cases where LUNs were still printed in decimal.

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

8 years agoMFC r291000: Register our FC4 Features in SNS.
mav [Mon, 30 Nov 2015 21:38:05 +0000 (21:38 +0000)]
MFC r291000: Register our FC4 Features in SNS.

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

8 years agoMFC r290993, r290994: Unify and cleanup FC ports scan.
mav [Mon, 30 Nov 2015 21:37:22 +0000 (21:37 +0000)]
MFC r290993, r290994: Unify and cleanup FC ports scan.

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

8 years agoMFC r290981: Off-by-one correctiont to r290980.
mav [Mon, 30 Nov 2015 21:36:23 +0000 (21:36 +0000)]
MFC r290981: Off-by-one correctiont to r290980.

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

8 years agoMFC r290980: Make firmware handle virtual ports SNS logins for us.
mav [Mon, 30 Nov 2015 21:35:43 +0000 (21:35 +0000)]
MFC r290980: Make firmware handle virtual ports SNS logins for us.

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

8 years agoMFC r290978: Add real initial support for RQSTYPE_RPT_ID_ACQ.
mav [Mon, 30 Nov 2015 21:35:03 +0000 (21:35 +0000)]
MFC r290978: Add real initial support for RQSTYPE_RPT_ID_ACQ.

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

8 years agoMFC r290830: Fix/improve CRN tracking.
mav [Mon, 30 Nov 2015 21:34:17 +0000 (21:34 +0000)]
MFC r290830: Fix/improve CRN tracking.

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

8 years agoMFC r290507: Rework r290504.
mav [Mon, 30 Nov 2015 21:33:30 +0000 (21:33 +0000)]
MFC r290507: Rework r290504.

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

8 years agoMFC r290506: Specify VP when sending a marker.
mav [Mon, 30 Nov 2015 21:32:52 +0000 (21:32 +0000)]
MFC r290506: Specify VP when sending a marker.

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

8 years agoMFC r290504: Make ISP_SLEEP() really sleep instead of spinning.
mav [Mon, 30 Nov 2015 21:32:12 +0000 (21:32 +0000)]
MFC r290504: Make ISP_SLEEP() really sleep instead of spinning.

While there, simplify the wait logic.

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

8 years agoMFC r290160: Remove some unneeded code.
mav [Mon, 30 Nov 2015 21:31:34 +0000 (21:31 +0000)]
MFC r290160: Remove some unneeded code.

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

8 years agoMFC r290159: Remove reset delays for which I see neither explanation nor need.
mav [Mon, 30 Nov 2015 21:30:56 +0000 (21:30 +0000)]
MFC r290159: Remove reset delays for which I see neither explanation nor need.

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

8 years agoMFC r290147: Fix and improve error masking and reporting.
mav [Mon, 30 Nov 2015 21:30:18 +0000 (21:30 +0000)]
MFC r290147: Fix and improve error masking and reporting.

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

8 years agoMFC r290118: Change the way how target mode is enabled on 23xx chips.
mav [Mon, 30 Nov 2015 21:29:38 +0000 (21:29 +0000)]
MFC r290118: Change the way how target mode is enabled on 23xx chips.

Without docs I am not completely sure about this, but on my tests new
method works better then previous, at least with our latest firmware.

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

8 years agoMFC r290104: Improve/fix loop scanning routine.
mav [Mon, 30 Nov 2015 21:28:53 +0000 (21:28 +0000)]
MFC r290104: Improve/fix loop scanning routine.

For the most of chips (except anscient ones) port handlers have no relation
to port IDs.  In such situation old code scanning first 125 handlers was
quite naive.  Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.

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

8 years agoMFC r289138: Remove legacy CHS geometry from dmesg and unify capacity outputs.
mav [Mon, 30 Nov 2015 21:23:30 +0000 (21:23 +0000)]
MFC r289138: Remove legacy CHS geometry from dmesg and unify capacity outputs.

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

8 years agoMFC r291383: Fix panic when trying to sort unsupported command in OOA queue.
mav [Mon, 30 Nov 2015 21:16:26 +0000 (21:16 +0000)]
MFC r291383: Fix panic when trying to sort unsupported command in OOA queue.

Handle unsupported commands as not conflicting/blocking.

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

8 years agoMFC: r290959
rmacklem [Mon, 30 Nov 2015 13:46:22 +0000 (13:46 +0000)]
MFC: r290959
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.

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

8 years agoMFC r291207:
smh [Mon, 30 Nov 2015 09:13:04 +0000 (09:13 +0000)]
MFC r291207:

Fix dumpon compatibility with dumpdev kenv

Sponsored by: Multiplay

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

8 years agoMFC r290855: Increase reset assertion time from 10 to 100us.
mav [Sun, 29 Nov 2015 17:14:05 +0000 (17:14 +0000)]
MFC r290855: Increase reset assertion time from 10 to 100us.

On my own tests I see no effect from this change, but I also can't
reproduce the reported problem in general.

PR: 127391
PR: 204554
Submitted by: satz@iranger.com

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

8 years agoMFC r289895:
kib [Sun, 29 Nov 2015 14:44:40 +0000 (14:44 +0000)]
MFC r289895:
Reduce the amount of calls to VOP_BMAP() made from the local vnode
pager.

MFC r291157, r291158:
Include the pages before/after the requested page, that fit into the
reqblock, into the calculation of the size of run of pages.

Tested by: pho

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

8 years agoMFC r291126:
mav [Sat, 28 Nov 2015 17:26:46 +0000 (17:26 +0000)]
MFC r291126:
Add API to obtain primary enclosure name and ID for /dev/sesX devices.

sesX device number may change between reboots, so to properly identify
the instance we need more data.  Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.

Sponsored by: iXsystems, Inc.

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

8 years agoMFC r291306:
gjb [Sat, 28 Nov 2015 02:17:04 +0000 (02:17 +0000)]
MFC r291306:
 Fix tmpfs(5) '/tmp' mount point.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r290820: Add NULL check to make Coverity happy.
mav [Fri, 27 Nov 2015 15:27:43 +0000 (15:27 +0000)]
MFC r290820: Add NULL check to make Coverity happy.

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