]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC r314637: sh: Add some already working tests that exercise new code paths
jilles [Sun, 12 Mar 2017 19:49:08 +0000 (19:49 +0000)]
MFC r314637: sh: Add some already working tests that exercise new code paths

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

7 years agoMFH (r303289): update example section
des [Sun, 12 Mar 2017 13:42:40 +0000 (13:42 +0000)]
MFH (r303289): update example section

PR: 211361

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

7 years agoMFH (r300602): the NAS identifier is a string, not an integer
des [Sun, 12 Mar 2017 13:36:14 +0000 (13:36 +0000)]
MFH (r300602): the NAS identifier is a string, not an integer

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

7 years agoMFH (r314598): load default options before requesting ticket
des [Sun, 12 Mar 2017 13:23:23 +0000 (13:23 +0000)]
MFH (r314598): load default options before requesting ticket

PR: 213909

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

7 years agoMFH (r314554): fix date in previous commit
des [Sun, 12 Mar 2017 13:20:07 +0000 (13:20 +0000)]
MFH (r314554): fix date in previous commit

Also remove mention of SKEIN-512 since it is not available in 10.

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

7 years agoMFH (r314528): update to reflect the state of SHA-1
des [Sun, 12 Mar 2017 13:15:26 +0000 (13:15 +0000)]
MFH (r314528): update to reflect the state of SHA-1

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

7 years agoMFC r314960:
kib [Sun, 12 Mar 2017 12:12:59 +0000 (12:12 +0000)]
MFC r314960:
Fix typo in comment.

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

7 years agoMFC r314308: Fix LUN enabling on wildcard target, as done by CTL.
mav [Sun, 12 Mar 2017 06:20:28 +0000 (06:20 +0000)]
MFC r314308: Fix LUN enabling on wildcard target, as done by CTL.

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

7 years agoMFC r314307: Add support for SIMs without autosense.
mav [Sun, 12 Mar 2017 06:18:41 +0000 (06:18 +0000)]
MFC r314307: Add support for SIMs without autosense.

If we asked to send sense data by setting CAM_SEND_SENSE, but SIM didn't
confirm transmission by setting CAM_SENT_SENSE, assume it was not sent.
Queue the I/O back to CTL for later REQUEST SENSE with ctl_queue_sense().
This is needed for error reporting on SPI HBAs like ahc(4)/ahd(4).

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

7 years agoMFC r314321:
pfg [Sun, 12 Mar 2017 05:36:31 +0000 (05:36 +0000)]
MFC r314321:
dc(1): Merge minor changes from OpenBSD.

Prefer setvbuf() to setlinebuf() for portability.
Some style(9) and redundant tests for NULL.

These are only meant to ease up merging newer changes.

Obtained from: OpenBSD

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

7 years agoMFC r314542:
ngie [Sun, 12 Mar 2017 04:58:57 +0000 (04:58 +0000)]
MFC r314542:

kern.cam.da.X.delete_method: add -width to .Bl macro call

Now the section width is set appropriately per the BIO_DELETE
parameter being described.

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

7 years agoMFC r314545:
ngie [Sun, 12 Mar 2017 04:57:21 +0000 (04:57 +0000)]
MFC r314545:

Add missing section to .Xr macro calls for wpifw(4)

The driver manpage for wpifw(4) is missing, but will be added soon. This
fixes the other 2 .Xr calls lacking sections to match the 3rd,
syntactically correct, reference in the SEE ALSO section.

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

7 years agoMFC r314233:
ngie [Sun, 12 Mar 2017 04:55:02 +0000 (04:55 +0000)]
MFC r314233:

Parameterize out the length of struct filed->f_lasttime as `MAXDATELEN`

This removes the hardcoded value for the field (16) and the equivalent
hardcoded lengths in logmsg(..).

This change is being done to help stage future work to add RFC5424/RFC5434
support to syslogd(8).

Obtained from: Isilon OneFS (dcd33d13da) (as part of a larger change)

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

7 years agoMFC r314189,r314190,r314191:
ngie [Sun, 12 Mar 2017 04:53:27 +0000 (04:53 +0000)]
MFC r314189,r314190,r314191:

r314189:

Fix up NULL/'\0' uses and fix 2 derefs after NULL

CID: 10188981018899

r314190:

Fix some minor style nits: put parentheses around return values

r314191:

Fix up r314189

The conditional in do_buff_decode(..) after the while loop was accidentally
inverted. Only increment the pointer for fmt if it's not NUL.

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

7 years agoMFC r314644:
ngie [Sun, 12 Mar 2017 04:41:27 +0000 (04:41 +0000)]
MFC r314644:

Fix "make depend" with geom_uzip.ko: add opt_geom.h to SRCS

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

7 years agoMFC r314239:
ngie [Sun, 12 Mar 2017 04:32:31 +0000 (04:32 +0000)]
MFC r314239:

Add shutdown/poweroff support to rescue(8)

shutdown is a safer way to power off than reboot (in general), because of
the added shutdown process that it executes via /etc/rc.shutdown . It was
odd that it was missing from rescue(8) since reboot and friends were
added in past commits.

While here, alias poweroff to shutdown for parity with sbin/shutdown/Makefile

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

7 years agoMFC r314240:
ngie [Sun, 12 Mar 2017 04:12:41 +0000 (04:12 +0000)]
MFC r314240:

Conditionally compile certain programs into rescue(8) if requested

MK_CCD - ccdconfig
MK_ROUTED - routed, rtquery

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

7 years agoMFC r314896:
cy [Sat, 11 Mar 2017 18:06:20 +0000 (18:06 +0000)]
MFC r314896:

Remove extraneous arguments and options, which don't make sense for
a file documented in volume 5.

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

7 years agoMFC r314768:
cy [Sat, 11 Mar 2017 17:57:22 +0000 (17:57 +0000)]
MFC r314768:

Fix mismerge of r280849.

Reported by: des

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

7 years agoMFC r312886:
cy [Sat, 11 Mar 2017 17:46:59 +0000 (17:46 +0000)]
MFC r312886:

Fix lookup of original destination address when using a redirect rule.
Transparent proxying, e.g. to squid, is an example of this.

Obtained from: NetBSD ip_nat.c r1.17, ip_nat6.c r1.10

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

7 years agoMFC r314274: l2arc: fix write size calculation broken by Compressed ARC commit
avg [Sat, 11 Mar 2017 15:30:35 +0000 (15:30 +0000)]
MFC r314274: l2arc: fix write size calculation broken by Compressed ARC commit

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

7 years agoMFC r314666: ioat: don't specify inline for function with variable argument list
avg [Sat, 11 Mar 2017 15:26:41 +0000 (15:26 +0000)]
MFC r314666: ioat: don't specify inline for function with variable argument list

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

7 years agoqlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy
avg [Sat, 11 Mar 2017 15:21:34 +0000 (15:21 +0000)]
qlxgbe: add GCC_MS_EXTENSIONS to CFLAGS to make old base GCC happy

The module uses unnamed structure and union fields and base GCC in
stable/10 doesn't like it.
I think that that is a C11 feature, so it is courteous of more modern
compilers to not complain about it when compiling in C99 mode.

This is a direct commit as the change is not required in head.

Approved by: davidcs

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

7 years agoMFC r303464 (by brooks@):
dchagin [Sat, 11 Mar 2017 08:40:59 +0000 (08:40 +0000)]
MFC r303464 (by brooks@):

Don't create pointless backups of generated files in "make sysent".

Any sensible workflow will include a revision control system from which
to restore the old files if required.  In normal usage, developers just
have to clean up the mess.

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

7 years agoMFC of r314281:
loos [Sat, 11 Mar 2017 07:54:05 +0000 (07:54 +0000)]
MFC of r314281:

Disable the driver managed queue for igb(4) when the legacy transmit
interface is used.

The legacy API (IGB_LEGACY_TX) is enabled when ALTQ is built into kernel.

As noted in altq(9), it is responsibility of the caller to protect this
queue against concurrent access and, in the igb case, the interface send
queue is protected by tx queue mutex.  This obviously cannot protect the
driver managed queue against concurrent access from different tx queues
and leads to numerous and quite strange panic traces (usually shown as
packets disappearing into thin air).

Improving the locking to cope with this means serialize all access to this
(single) queue and produces no gain, it actually affects the performance
quite noticeabily.

The driver managed queue is already disabled when an ALTQ queue discipline
is set on interface (in altq_enable()), because the driver managed queue
can interfere with ALTQ timing (whence the reports that setting an ALTQ
queue discipline on interface also fixes the issue).

Disabling this additional queue keeps the ability to use if_start() to
send packets to individual NIC queues while it simply eliminate the race.

This is a direct commit to stable/11 as -head driver does not support ALTQ
anymore.

PR: 213257
PR: 212413
Discussed with: sbruno
Tested by: Konstantin Kormashev <konstantin@netgate.com>
Obtained from: pfSense
Sponsored by: Rubicon Communications, LLC (Netgate)

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

7 years agoMFC r314626
vangyzen [Fri, 10 Mar 2017 20:48:38 +0000 (20:48 +0000)]
MFC r314626

Fix grammar in some comments in subr_sleepqueue.c

While I'm here, remove trailing whitespace.

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

7 years agoMFC r313820
vangyzen [Fri, 10 Mar 2017 20:38:18 +0000 (20:38 +0000)]
MFC r313820

pf: use inet_ntoa_r() instead of inet_ntoa(); maybe fix IPv6 OS fingerprinting

inet_ntoa() cannot be used safely in a multithreaded environment
because it uses a static local buffer. Instead, use inet_ntoa_r()
with a buffer on the caller's stack.

This code had an INET6 conditional before this commit, but opt_inet6.h
was not included, so INET6 was never defined.  Apparently, pf's OS
fingerprinting hasn't worked with IPv6 for quite some time.
This commit might fix it, but I didn't test that.

Relnotes: yes (if I/someone can test pf OS fingerprinting with IPv6)
Sponsored by: Dell EMC

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

7 years agoMFC r314055
vangyzen [Fri, 10 Mar 2017 20:07:38 +0000 (20:07 +0000)]
MFC r314055

Make several improvements and corrections in the kenv(2) man page

Sponsored by: Dell EMC

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

7 years agoMFC r313817
vangyzen [Fri, 10 Mar 2017 19:34:14 +0000 (19:34 +0000)]
MFC r313817

acpica: remove a superfluous NULL check

The address-of operator can't produce NULL (in practice).
Remove an unnecessary NULL check.

Sponsored by: Dell EMC

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

7 years agoMFC r313841, r313850:
markj [Fri, 10 Mar 2017 18:52:37 +0000 (18:52 +0000)]
MFC r313841, r313850:
Prevent CPU migration when checking the DTrace nofault flag on x86.

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

7 years agoMFC r314592: Fix JSON output.
mav [Fri, 10 Mar 2017 06:18:27 +0000 (06:18 +0000)]
MFC r314592: Fix JSON output.

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

7 years agoMFC r314810:
kp [Thu, 9 Mar 2017 03:20:20 +0000 (03:20 +0000)]
MFC r314810:

pf: Fix a crash in low-memory situations

If the call to pf_state_key_clone() in pf_get_translation() fails (i.e. there's
no more memory for it) it frees skp. This is wrong, because skp is a
pf_state_key **, so we need to free *skp, as is done later in the function.
Getting it wrong means we try to free a stack variable of the calling
pf_test_rule() function, and we panic.

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

7 years agoMFC r314145, r314158
pfg [Thu, 9 Mar 2017 02:59:02 +0000 (02:59 +0000)]
MFC r314145, r314158
vxge(4): double assignments.

Fix some suspicious code, likely caused by excessive copy-pasting.

Found with: coccinelle (da.cocci)

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

7 years agoRevert 294545:
pfg [Thu, 9 Mar 2017 02:47:01 +0000 (02:47 +0000)]
Revert 294545:
Bringing back ext4: add support for reading sparse files

Add GCC_MS_EXTENSIONS to the CFLAGS in the module to make the old GCC in
base happy. This workaround is only required in stable/10.

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

7 years agoMFC r314505:
pfg [Wed, 8 Mar 2017 22:39:45 +0000 (22:39 +0000)]
MFC r314505:
Split the ficl CFLAGS when they refer to an arch-specific include path.

This is a minimal attempt to keep consistency in the Makefiles so that
moving ficl to somwehere like contrib will be less error prone.

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

7 years agoMFC r314061:
dim [Wed, 8 Mar 2017 07:58:29 +0000 (07:58 +0000)]
MFC r314061:

Add __int128-related symbols to libcxxrt's version map.  Put these into
the same CXXABI verions as recent libstdc++.

Note that __int128 types are only available on arches where long long is
128 bit wide.

Noticed by: harti

MFC r314104:

Surround any unmangled C++ names in libcxxrt's version map with 'extern
"C++"', otherwise ld refuses to make the symbols global in the final
library.  This causes the __int128-related symbols to go missing when
the library is stripped during installation.

Helpful hints: emaste

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

7 years agoMFC 313879
jpaetzel [Tue, 7 Mar 2017 18:31:03 +0000 (18:31 +0000)]
MFC 313879

MVF: 313876

7504 kmem_reap hangs spa_sync and administrative tasks

illumos/illumos-gate@405a5a0f5c3ab36cb76559467d1a62ba648bd809
https://github.com/illumos/illumos-gate/commit/405a5a0f5c3ab36cb76559467d1a62ba648bd80

https://www.illumos.org/issues/7504

  We see long spa_sync(). We are waiting to hold dp_config_rwlock for writer. Some
  other thread holds dp_config_rwlock for reader, then calls arc_get_data_buf(),
  which finds that arc_is_overflowing()==B_TRUE. So it waits (while holding
  dp_config_rwlock for reader) for arc_reclaim_thread to signal arc_reclaim_waiters_cv.
  Before signaling, arc_reclaim_thread does arc_kmem_reap_now(), which takes ~seconds.

Author: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

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

7 years agoMFC r314058: zfs: lower priority of zio_write_issue threads by four
avg [Tue, 7 Mar 2017 15:27:23 +0000 (15:27 +0000)]
MFC r314058: zfs: lower priority of zio_write_issue threads by four

Obtained from: Panzura
Sponsored by: Panzura

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

7 years agoMFC r314429:
kib [Tue, 7 Mar 2017 12:24:02 +0000 (12:24 +0000)]
MFC r314429:
Initialize pcb_save for thread0.

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

7 years agoMFC r314374: Add safety check against too long CDB.
mav [Tue, 7 Mar 2017 05:57:18 +0000 (05:57 +0000)]
MFC r314374: Add safety check against too long CDB.

SBP-2 specification defined maximum CDB length as 12 bytes.  Newer SBP-3
specification allows CDB of any size, but this driver is too old.  Proper
solution would be to look on maximal ORB size supported by the target.

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

7 years agoMFC r314627:
cy [Tue, 7 Mar 2017 05:35:14 +0000 (05:35 +0000)]
MFC r314627:

Fix leak (free str before returning when ctx's calloc fails).

Submitted by: trix_juniper.net (Tom Rix)
Reviewed by: cy, ngie
Discovered by: clang's static analyzer
Differential Revision: D9877

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

7 years agoMFC r314430:
ae [Tue, 7 Mar 2017 03:53:09 +0000 (03:53 +0000)]
MFC r314430:
  When IPv6 fragments reassembly is complete, update mbuf's csum_data
  and csum_flags using information from all fragments. This fixes
  dropping of reassembled packets due to wrong checksum when the IPv6
  checksum offloading is enabled on a network card.

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

7 years agoMFC r314242:
ngie [Tue, 7 Mar 2017 02:02:51 +0000 (02:02 +0000)]
MFC r314242:

Remove MK_CRYPT stub

It doesn't directly control what gets installed today; it indirectly
pulls other knobs (like MK_KERBEROS, etc).

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

7 years agoMFC r314226:
ngie [Tue, 7 Mar 2017 02:01:32 +0000 (02:01 +0000)]
MFC r314226:

Use SRCTOP instead of .CURDIR relative paths with ".."

This simplifies pathing in make/displayed output

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

7 years agoMFC r313438:
ngie [Tue, 7 Mar 2017 01:58:56 +0000 (01:58 +0000)]
MFC r313438:

Clean up trailing and leading whitespace for variables to make it
consistent with the rest of the file and style.Makefile(9) a bit
more

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

7 years agoMFC r314450,r313439:
ngie [Tue, 7 Mar 2017 01:52:50 +0000 (01:52 +0000)]
MFC r314450,r313439:

r314450:

Add additional __FreeBSD_version guards around the hsearch_r testcases

The reasoning for this is the same as r276046: to ease MFCing the tests
to ^/stable/10 .

This was accidentally missed in r313439

r313439 | ngie | 2017-02-08 01:46:15 -0800 (Wed, 08 Feb 2017) | 25 lines

Merge content from ^/projects/netbsd-tests-upstream-01-2017 into ^/head

The primary end-goal of this drop is ease future merges with NetBSD and
collaborate further with the NetBSD project.

The goal was (largely, not completely as some items are still oustanding
in the NetBSD GNATS system) achieved by doing the following:
- Pushing as many changes required to port contrib/netbsd-tests
  back to NetBSD as possible, then pull the upstream applied changes
  back in to FreeBSD.
- Diff reduce with upstream where possible by:
-- Improving libnetbsd header, etc compat glue.
-- Using _SED variables to modify test scripts on the fly for items
   that could not be upstreamed to NetBSD.

As a bonus for this work, this change also introduces testcases for
uniq(1).

Many thanks to Christos for working with me to get many of the changes
back into the NetBSD project.

In collaboration with: Christos Zoulas <christos@netbsd.org>

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

7 years agoMFC r314062
davidcs [Mon, 6 Mar 2017 20:35:03 +0000 (20:35 +0000)]
MFC r314062
add bus_dmamap_unload in ql_free_dmabuf()

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

7 years agoMFC r314509 and r314578.
np [Mon, 6 Mar 2017 15:16:15 +0000 (15:16 +0000)]
MFC r314509 and r314578.

r314509:
cxgbe/iw_cxgbe: Do not check the size of the memory region being
registered.  T4/5/6 have no internal limit on this size.  This is
probably a copy paste from the T3 iw_cxgb driver.

r314578:
cxgbe/iw_cxgbe: Implement sq/rq drain operation.

ULPs can set a qp's state to ERROR and then post a work request on the
sq and/or rq.  When the reply for that work request comes back it is
guaranteed that all previous work requests posted on that queue have
been drained.

Sponsored by: Chelsio Communications

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

7 years agoMFC r314338: Polish handling of different reset flavours.
mav [Mon, 6 Mar 2017 06:47:05 +0000 (06:47 +0000)]
MFC r314338: Polish handling of different reset flavours.

The biggest change is that ctl_remove_initiator() now generates I_T NEXUS
LOSS event, cleaning part of LUs state related to the initiator.

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

7 years agoMFC r314326: Send TERMINATE to firmware when aborting active ATIO.
mav [Mon, 6 Mar 2017 06:45:35 +0000 (06:45 +0000)]
MFC r314326: Send TERMINATE to firmware when aborting active ATIO.

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

7 years agoMFC r314496: Add check missed in r314257.
mav [Mon, 6 Mar 2017 06:43:17 +0000 (06:43 +0000)]
MFC r314496: Add check missed in r314257.

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

7 years agoMFC r314387: Make ctl_queue_sense() not sleep.
mav [Mon, 6 Mar 2017 06:41:06 +0000 (06:41 +0000)]
MFC r314387: Make ctl_queue_sense() not sleep.

It may be called in non-sleepable frontend context.

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

7 years agoMFC r314302: Return better error code in case of too long CDB.
mav [Mon, 6 Mar 2017 06:39:42 +0000 (06:39 +0000)]
MFC r314302: Return better error code in case of too long CDB.

Its more important for SPI HBAs, as they don't support CDBs above 12 bytes.
The new error code makes CAM to fall back to alternative commands.

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

7 years agoMFC r314299, r314300: Fix residual length reporting in target mode.
mav [Mon, 6 Mar 2017 06:38:26 +0000 (06:38 +0000)]
MFC r314299, r314300: Fix residual length reporting in target mode.

This allows to properly handle cases when target wants to receive or send
more data then initiator wants to send or receive.  Previously in such
cases isp(4) returned CAM_DATA_RUN_ERR, while now it returns resid > 0.

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

7 years agoMFC r314257: Add reporting SAS protocol, in case we ever have one.
mav [Mon, 6 Mar 2017 06:36:45 +0000 (06:36 +0000)]
MFC r314257: Add reporting SAS protocol, in case we ever have one.

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

7 years agoMFC r314255: Reenable CTL_WITH_CA, optimizing it for lower memory usage.
mav [Mon, 6 Mar 2017 06:35:32 +0000 (06:35 +0000)]
MFC r314255: Reenable CTL_WITH_CA, optimizing it for lower memory usage.

This code was disabled due to its high memory usage.  But now we need this
functionality for cfumass(4) frontend, since USB MS BBB transport does not
support autosense.

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

7 years agoMFC r314247: Axe out some forever disabled questionable functionality.
mav [Mon, 6 Mar 2017 06:33:18 +0000 (06:33 +0000)]
MFC r314247: Axe out some forever disabled questionable functionality.

This code is complicated enough even in its base shape.

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

7 years agoMFC r314246: Improve CAM target frontend reference counting.
mav [Mon, 6 Mar 2017 06:32:14 +0000 (06:32 +0000)]
MFC r314246: Improve CAM target frontend reference counting.

Before this change it was possible to trigger some use-after-free panics
by disabling LUNs/ports under heavy load.

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

7 years agoMFC r314208: Respecting r314204 tighten ATIO cleanup requirements.
mav [Mon, 6 Mar 2017 06:30:55 +0000 (06:30 +0000)]
MFC r314208: Respecting r314204 tighten ATIO cleanup requirements.

Every ATIO must complete with either successfully sent status or XPT_ABORT.

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

7 years agoMFC r314204: Explicitly abort ATIO if CTIO sending status has failed.
mav [Mon, 6 Mar 2017 06:29:42 +0000 (06:29 +0000)]
MFC r314204: Explicitly abort ATIO if CTIO sending status has failed.

This helps SIM to free related resources in questionable cases.

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

7 years agoMFC r314203: Fix missing xpt_done() for ATIO/INOT on missing LUN.
mav [Mon, 6 Mar 2017 06:28:30 +0000 (06:28 +0000)]
MFC r314203: Fix missing xpt_done() for ATIO/INOT on missing LUN.

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

7 years agoMFC r314200: We can't access periph after ctlfe_free_ccb().
mav [Mon, 6 Mar 2017 06:26:43 +0000 (06:26 +0000)]
MFC r314200: We can't access periph after ctlfe_free_ccb().

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

7 years agoMFC r314196: Unify ATIO/INOT CCBs requeuing.
mav [Mon, 6 Mar 2017 06:26:02 +0000 (06:26 +0000)]
MFC r314196: Unify ATIO/INOT CCBs requeuing.

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

7 years agoMFC r314193: Some code cleanup.
mav [Mon, 6 Mar 2017 06:24:53 +0000 (06:24 +0000)]
MFC r314193: Some code cleanup.

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

7 years agoMFC r314088: Slightly polish isp_dump_atpd().
mav [Mon, 6 Mar 2017 06:23:45 +0000 (06:23 +0000)]
MFC r314088: Slightly polish isp_dump_atpd().

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

7 years agoMFC r314086: Fix multiple problems around LUN disable under load.
mav [Mon, 6 Mar 2017 06:22:37 +0000 (06:22 +0000)]
MFC r314086: Fix multiple problems around LUN disable under load.

 - Move private data about ATIOs/INOTs from per-LUN to per-channel data.
This allows active commands to continue operation after LUN destruction.
This also simplifies lookup of the data by tag in some situations.
 - Unify three restart_queue processing implementations.
 - Complete all ATIOs from restart_queue on LUN disable.
 - Delete ATIO private data when command completed or aborted, not depending
on the ATIO being requeued, that was ugly hack and could never happen.  CAM
should always call ether XPT_CONT_TARGET_IO with status or XPT_ABORT.
 - Implement XPT_ABORT for queued ATIOs/INOTs to allow CAM do graceful
shutdown, not depending on LUN disable, as it is done in ahd(4)/targ(4).
 - Unify isp_endcmd() arguments to make it more usable in generic code.
 - Remove never really used LUN state reference counter.

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

7 years agoMFC r314045: Remove duplicate INOT allocation.
mav [Mon, 6 Mar 2017 06:21:26 +0000 (06:21 +0000)]
MFC r314045: Remove duplicate INOT allocation.

For some reason isp_handle_platform_notify_fc() allocated INOT just
before calling isp_handle_platform_target_tmf(), which also allocates
INOT.  It seems to be a braino introduced in r196008.

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

7 years agoMFC r314038: Remove ancient __FreeBSD_version checks.
mav [Mon, 6 Mar 2017 06:20:14 +0000 (06:20 +0000)]
MFC r314038: Remove ancient __FreeBSD_version checks.

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

7 years agoMFC r314027: Do not blindly free completed ATIOs/INOTs on invalidation.
mav [Mon, 6 Mar 2017 06:19:02 +0000 (06:19 +0000)]
MFC r314027: Do not blindly free completed ATIOs/INOTs on invalidation.

When LUN is disabled, SIM starts returning queued ATIOs/INOTs.  But at the
same time there can be some ATIOs/INOTs still carrying real new requests.
If we free those, SIM may leak some resources, forever expecting for any
response from us.  So try to be careful, separating ATIOs/INOTs carrying
requests which still must be processed, from ATIOs/INOTs completed with
errors which can be freed.

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

7 years agoMFC r314358: Announce that sbp_targ(4) does not support initiator mode.
mav [Mon, 6 Mar 2017 06:09:33 +0000 (06:09 +0000)]
MFC r314358: Announce that sbp_targ(4) does not support initiator mode.

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

7 years agoMFC r314572:
mm [Sun, 5 Mar 2017 21:42:03 +0000 (21:42 +0000)]
MFC r314572:

Fix null pointer dereference in zfs_freebsd_setacl().

Prevents unprivileged users from panicking the kernel by calling
__acl_delete_*() on files or directories inside a ZFS mount.

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

7 years agoMFC r313936, r313937: Move CTIO waitq from per-LUN to per-channel.
mav [Sun, 5 Mar 2017 05:17:36 +0000 (05:17 +0000)]
MFC r313936, r313937: Move CTIO waitq from per-LUN to per-channel.

All resources lack of which may put CTIO into the queue are either
per-channel or potentially per-queue, but none of them are per-LUN.

This is a first step to fix live LUN disabling.  Before this change
any CTIOs held in a queue in time of disabling were just leaked.

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

7 years agoMFC r313945: Remove broken remnants of obsolete INOT API.
mav [Sun, 5 Mar 2017 05:15:35 +0000 (05:15 +0000)]
MFC r313945: Remove broken remnants of obsolete INOT API.

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

7 years agoMFC r314562:
kib [Sun, 5 Mar 2017 00:37:23 +0000 (00:37 +0000)]
MFC r314562:
Style.

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

7 years agoMFC r313909:
bdrewery [Sat, 4 Mar 2017 18:11:59 +0000 (18:11 +0000)]
MFC r313909:

  Fix panic with unlocked vnode to vrecycle().

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

7 years agoMFC r314273: zfs: call spa_deadman on a taskqueue thread
avg [Sat, 4 Mar 2017 13:05:04 +0000 (13:05 +0000)]
MFC r314273: zfs: call spa_deadman on a taskqueue thread

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

7 years agoMFC r283291: don't use CALLOUT_MPSAFE with callout_init()
avg [Sat, 4 Mar 2017 13:03:31 +0000 (13:03 +0000)]
MFC r283291: don't use CALLOUT_MPSAFE with callout_init()

The main purpose of this MFC is to reduce conflicts for other merges.
Parts of the original change have already "trickled down" via individual MFCs.

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

7 years agoMFC r314272: call vm_lowmem hook in uma_reclaim_worker
avg [Sat, 4 Mar 2017 12:05:50 +0000 (12:05 +0000)]
MFC r314272: call vm_lowmem hook in uma_reclaim_worker

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

7 years agoMFC r314357: edge-triggered interrupt mode is set by clearing APIC_LVT_TM
avg [Sat, 4 Mar 2017 12:04:24 +0000 (12:04 +0000)]
MFC r314357: edge-triggered interrupt mode is set by clearing APIC_LVT_TM

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

7 years agoMFC r313867,r313869,r313870,r314001:
bdrewery [Fri, 3 Mar 2017 21:41:17 +0000 (21:41 +0000)]
MFC r313867,r313869,r313870,r314001:

  r313867:
    Add history and Authors section in the manpage
  r313869:
    Also add vsevolod@ in the authors
  r313870:
    Use full name for the month
  r314001:
    Make it more clear that -k sends SIGKILL, not the -s signal.

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

7 years agoMFC r314400:
np [Fri, 3 Mar 2017 17:57:17 +0000 (17:57 +0000)]
MFC r314400:

cxgbe/iw_cxgbe: fix various double-close panics with iWARP sockets.

Sockets representing the TCP endpoints for iWARP connections are
allocated by the ibcore module.  Before this revision they were closed
either by the ibcore module or the iw_cxgbe hardware driver depending on
the state transitions during connection teardown.  This is error prone
and there were cases where both iw_cxgbe and ibcore closed the socket
leading to double-free panics.  The fix is to let ibcore close the
sockets it creates and never do it in the driver.

- Use sodisconnect instead of soclose (preceded by solinger = 0) in the
  driver to tear down an RDMA connection abruptly.  This does what's
  intended without releasing the socket's fd reference.

- Close the socket in ibcore when the iWARP iw_cm_id is destroyed.  This
  works for all kinds of sockets: clients that initiate connections,
  listeners, and sockets accepted off of listeners.

Sponsored by: Chelsio Communications

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

7 years agoMFH (r278120): add missing ssh-related files
des [Fri, 3 Mar 2017 13:32:01 +0000 (13:32 +0000)]
MFH (r278120): add missing ssh-related files

PR: 193980
Submitted by: mcdouga9@egr.msu.edu

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

7 years agomlx5 module: remove include path that doesn't exist in this branch
avg [Fri, 3 Mar 2017 12:06:33 +0000 (12:06 +0000)]
mlx5 module: remove include path that doesn't exist in this branch

This is a direct commit.
It allows the module to be compiled with the base gcc.

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

7 years agoMFC r288112,r302571: remove unused and redundant declarations and code
avg [Fri, 3 Mar 2017 12:03:50 +0000 (12:03 +0000)]
MFC r288112,r302571: remove unused and redundant declarations and code

r288112 Hide an unused in FreeBSD function behind #ifdef linux to get rid of
the compile time warning.

r302571 Remove redundant declaration for radeon_pm_acpi_event_handler(..) to fix
-Wredundant-decls warning

This allows the code to be compiled with the base gcc.

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

7 years agoMFC r314195:
kib [Fri, 3 Mar 2017 10:17:16 +0000 (10:17 +0000)]
MFC r314195:
Properly handle possible underflow in vm_fault_prefault().

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

7 years agoMFC r313852: Freeze CAM SIM when request is postponed due to MaxCmdSN.
mav [Fri, 3 Mar 2017 06:04:42 +0000 (06:04 +0000)]
MFC r313852: Freeze CAM SIM when request is postponed due to MaxCmdSN.

This allows to avoid resource allocation (especially offload) for requests
that can not be executed at this time any way.

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

7 years agoMFC r313851: Fix tight loop spinning on postponed requests.
mav [Fri, 3 Mar 2017 06:03:01 +0000 (06:03 +0000)]
MFC r313851: Fix tight loop spinning on postponed requests.

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

7 years agoMFC r309649 (oshogbo): tcpdump: allow to use BIOCROTZBUF in capability mode
emaste [Thu, 2 Mar 2017 17:17:06 +0000 (17:17 +0000)]
MFC r309649 (oshogbo): tcpdump: allow to use BIOCROTZBUF in capability mode

The libpcap library can use a BIOCROTZBUF ioctl when net.bpf.zerocopy_enable
sysctl is set.

PR: 217490

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

7 years agoFix r314332 (MFC of r300903): do not use C99 Static array indices
avg [Thu, 2 Mar 2017 09:10:39 +0000 (09:10 +0000)]
Fix r314332 (MFC of r300903): do not use C99 Static array indices

The proper conditional support for that feature has not been MFC-ed yet
and GCC is quirky about it.  See r314101.

This is a direct commit.

Reported by: gjb

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

7 years agoMFC r314101: don't use C99 static array indices with older GCC versions
avg [Wed, 1 Mar 2017 13:47:36 +0000 (13:47 +0000)]
MFC r314101: don't use C99 static array indices with older GCC versions

Sponsored by: Panzura

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

7 years agoMFC r314100: fix a typo in __STDC_VERSION__ in __min_size requirements
avg [Wed, 1 Mar 2017 13:45:50 +0000 (13:45 +0000)]
MFC r314100: fix a typo in __STDC_VERSION__ in __min_size requirements

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

7 years agoMFC r313774: localtime: return NULL if time_t out of range of struct tm
emaste [Wed, 1 Mar 2017 01:44:40 +0000 (01:44 +0000)]
MFC r313774:    localtime: return NULL if time_t out of range of struct tm

Previously we would truncate tm.tm_year for any time_t corresponding to
a year that does not fit in int.  This issue was discovered because it
caused the bash-static build to fail when linking with LLD.

As reported by Rafael EspĂ­ndola:

    Configure has

    AC_FUNC_MKTIME

    which expands to a test of mktime that fails with the freebsd
    implementation. Given that, bash compiles a mktime.o file that
    defines just mktime and uses localtime. That goes in a .a file
    that is before libc.

    The freebsd libc defines mktime in localtime.o, which also defines
    localtime among other functions.

    When lld sees an undefined reference to mktime from libc, it uses
    the bash provided one and then tries to find a definition of
    localtime. It is found on libc's localtime.o, but now we have a
    duplicated error.

    The reason it works with bfd is that bash doesn't use mktime
    directly and the undefined reference from libc is resolved to the
    libc implementation. It would also fail to link if bash itself
    directly used mktime.

The bash-static configure test verifies that, for many values of t, either
localtime(t) returns NULL or mktime(localtime(t)) == t.  This test failed
when localtime returned a truncated tm_year.

This was fixed in tzcode in 2004 but has persisted in our tree since
rS2708.

Sponsored by: The FreeBSD Foundation

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

7 years agoMFC r314316:
pfg [Wed, 1 Mar 2017 01:19:41 +0000 (01:19 +0000)]
MFC r314316:
dc(1): Catch up with OpenBSD tag.

OpenBSD rev 1.12 corresponds to our SVN r275162. Update the tag to make
easier future updates. No functional change.

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

7 years agoMFC r312995:
asomers [Wed, 1 Mar 2017 00:13:58 +0000 (00:13 +0000)]
MFC r312995:

Initialize a stack variable in mprsas_get_sas_address_for_sata_disk

Thought it's difficult to reproduce, I think this variable was responsible
for a use-after-free panic when a SATA disk timed out responding to a SATA
identify command during boot.

Submitted by: slm
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9364

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

7 years agoMFC r312559:
asomers [Tue, 28 Feb 2017 23:56:14 +0000 (23:56 +0000)]
MFC r312559:

Fix misc Coverity defects in camdd(8)

CID 1341620 Fix a small memory leak
CID 1341630 Though this is technically a false positive, rearrange the
code for clarity.
CID 1341635 Eliminate dead code
CID 1368663 Fix a double mutex unlock in the error path

Also:
* Use sig_atomic_t for variables accessed from signal handlers
* Don't conditionalize free(3) on its argument being non-null

Reported by: Coverity
CID: 1341620 1341630 1341635 1368663
Reviewed by: ken
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9237

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

7 years agoMFC r311572, r311895, r311928, r311985, r312395, r312417
asomers [Tue, 28 Feb 2017 22:18:05 +0000 (22:18 +0000)]
MFC r311572, r311895, r311928, r311985, r312395, r312417

r311572:
Fix file descriptor leaks in cmp(1)

Also, add a few test cases

Reported by: Coverity
CID: 271624 275338
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9074

r311895:
Fix memory leaks during "tail -r" of an irregular file

* Rewrite r_buf to use standard tail queues instead of a hand-rolled
  circular linked list. Free dynamic allocations when done.
* Remove an optimization for the case where the file is a multiple of 128KB
  in size and there is a scarcity of memory.
* Add ATF tests for "tail -r" and its variants.

Reported by: Valgrind
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9067

r311928:
Fix build of usr.bin/tail with GCC

Submitted by: pluknet
Reported by: pluknet
MFC after: 27 days
X-MFC-with: 311895
Sponsored by: Spectra Logic Corp

r311985:
Fix uninitialized variable CIDs in route6d

The variables in question are actually return arguments, but it's still good
form to initialize them.

Reported by: Coverity
CID: 979679 979680
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r312395:
Fix several Coverity CIDs in devd

CID 13620551362054: File descriptor leaks during shutdown
CID 1362013: Potential null-termination fail with long network device names
CID 1362097: Uncaught exception during memory pressure
CID 13620171362016: Unchecked errors, possibly resulting in weird behavior
if two devd instances start at the same time.
CID 1362015: Unchecked error that will probably never fail

Reported by: Coverity
CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp

r312417:
Fix build of devd with GCC 4.2

Reported by: olivier
Pointy-hat-to: asomers
MFC after: 27 days
X-MFC-with: 312395
Sponsored by: Spectra Logic Corp

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

7 years agoMFC r313734:
kib [Tue, 28 Feb 2017 15:03:34 +0000 (15:03 +0000)]
MFC r313734:
Add RLIM_SAVED_MAX and RLIM_SAVED_CUR symbols.

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

7 years agoMFC r313751: mca: fix writes to MSR_MC_CTL2 in cmci_update
avg [Tue, 28 Feb 2017 11:42:04 +0000 (11:42 +0000)]
MFC r313751: mca: fix writes to MSR_MC_CTL2 in cmci_update

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

7 years agoMFC r313744: No need to erase sense_data when sense_len is set to zero.
mav [Tue, 28 Feb 2017 06:32:01 +0000 (06:32 +0000)]
MFC r313744: No need to erase sense_data when sense_len is set to zero.

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

7 years agoMFC r314244:
ngie [Tue, 28 Feb 2017 00:58:16 +0000 (00:58 +0000)]
MFC r314244:

Remove MK_OBJC block

It is no longer represented via src.conf(5)

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