Commit Graph

212800 Commits

Author SHA1 Message Date
dteske
d84010cd10 Use a variable for readability
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:14:48 +00:00
dteske
336ab64092 Update copyright
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:13:34 +00:00
dteske
d06c7f4aee Better to reset trap and explicitly exit success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:12:41 +00:00
dteske
cf27eb785e Remove trailing newline at EOF
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:09:39 +00:00
dteske
619846e1ef Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:08:46 +00:00
dteske
b7553a37e9 Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 21:01:26 +00:00
dteske
41e091074a Explicitly exit with success
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:59:13 +00:00
dteske
4f2a0e318f Update copyrights
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:58:00 +00:00
dteske
5e54510dd0 Produce meaningful exit code
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:56:36 +00:00
dteske
5bd4f328a6 Remove use of return outside of function
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:45:41 +00:00
dteske
bc7a1b0134 Ignore error results from newaliases(1)
MFC after:	3 days
X-MFC-to:	stable/10
2015-09-11 20:39:41 +00:00
dim
2a0c9817c7 Since contrib/libc++'s ancestry was never correct, subversion 1.8 and
higher cannot merge to it from the vendor area.

Re-bootstrap the ancestry by doing (apologies to your retinas):
* svn rm contrib/libc++
* svn cp ^/vendor/libc++/dist@276792 contrib/libc++
* svn cp ^/head/contrib/libc++/FREEBSD-upgrade@287629 contrib/libc++
* svn cp ^/head/contrib/libc++/include/__bit_reference@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/__config@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/__tree@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/algorithm@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/stdexcept@287629 contrib/libc++/include
* svn cp ^/head/contrib/libc++/include/type_traits@287629 contrib/libc++/include
* svn pd -R svn:mergeinfo contrib/libc++
* svn ps -F mergeinfo.txt contrib/libc++
2015-09-11 17:14:58 +00:00
cy
9224c7597d Revert ip_fil_freebsd.c -r287674. This should not have gone in yet. 2015-09-11 16:52:13 +00:00
cy
babd3f94a4 Fix ipfilter bug 3600459 NAT bucket count wrong.
Obtained from:	ipfilter cvs repo r1.48.2.25
MFC after:	2 weeks
2015-09-11 16:49:52 +00:00
avg
ec0c2ca135 radeon_suspend_kms: don't mess with pci state that's managed by the bus
The pci bus driver handles the power state, it also manages
configuration state saving and restoring for its child devices.  Thus a
PCI device driver does not have to worry about those things.  In fact, I
observe a hard system hang when trying to suspend a system with active
radeonkms driver where both the bus driver and radeonkms driver try to
do the same thing.  I suspect that it could be because of an access to a
PCI configuration register after the device is placed into D3 state.

Reviewed by:	dumbbell, jhb
MFC after:	13 days
Differential Revision:	https://reviews.freebsd.org/D3561
2015-09-11 15:51:20 +00:00
mav
f992fbc2ed Make ctld restart on primary HA node less invasive for secondary. 2015-09-11 14:47:35 +00:00
mav
2d639a52d6 Close races between device close and request processing.
All requests arriving for processing after OFFLINE flag set are rejected
with BUSY status.  Races around OFFLINE flag setting are closed by calling
taskqueue_drain_all().
2015-09-11 14:33:05 +00:00
tuexen
1947f60716 Ensure that ERROR chunks are always padded by implementing this
in the routine, which queues an ERROR chunk, instead on relyinh
on the callers to do so. Since one caller missed this, this actially
fixes a bug.

MFC after:	1 week
2015-09-11 13:54:33 +00:00
mav
fcc54645c3 Reference/release devices on every I/O, rather on open/close.
While this may be slower, it allows device destruction to complete,
rather then block waiting for indefinitely long time.
2015-09-11 12:50:52 +00:00
mav
995896fbf0 Add support for PPP-Max-Payload PPPoE tag (RFC4638).
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2015-09-11 09:15:27 +00:00
cy
66e9acbb5f Revert $FreeBSD$. 2015-09-11 08:48:16 +00:00
cy
ddcad7b235 Fix mutex errors.
Obtained from:	NetBSD r1.4.
MFC after:	1 week
2015-09-11 08:35:53 +00:00
cy
5d85607054 Fixup typos in comments.
Obtained from:	NetBSD r1.4.
MFC after:	1 week
2015-09-11 08:27:32 +00:00
delphij
85e8cd9339 Use strlcpy() in favor of strncpy() as it's defined to have a nul character
at the end of string buffer, and the code context do expects this to behave
correctly (e.g. strchr).

Note that we do not believe there is real-world impact for gstat(8)'s usage
because the strings are length checked, and the on-stack buffer belongs to
main() and we can expect to have zeros in them.

MFC after:	2 weeks
2015-09-11 06:52:57 +00:00
markj
65d9a559eb Use a common subroutine to fetch and zero protocol stats instead of
duplicating roughly similar code for each protocol.

MFC after:	2 weeks
2015-09-11 04:37:01 +00:00
imp
dbff665874 bufdonebio is now unused. Retire it too. 2015-09-11 04:20:04 +00:00
markj
052afc4e16 Remove prototypes for undefined functions from netstat.h. 2015-09-11 04:02:05 +00:00
markj
899d16104d Document stack_save_td(9) and stack_save_td_running(9).
Reviewed by:	wblock
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3243
2015-09-11 03:56:04 +00:00
markj
e8967c8bd9 Add stack_save_td_running(), a function to trace the kernel stack of a
running thread.

It is currently implemented only on amd64 and i386; on these
architectures, it is implemented by raising an NMI on the CPU on which
the target thread is currently running. Unlike stack_save_td(), it may
fail, for example if the thread is running in user mode.

This change also modifies the kern.proc.kstack sysctl to use this function,
so that stacks of running threads are shown in the output of "procstat -kk".
This is handy for debugging threads that are stuck in a busy loop.

Reviewed by:	bdrewery, jhb, kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3256
2015-09-11 03:54:37 +00:00
markj
b30bc0e211 Remove the arg0 field from struct amd64_frame. Its existence was a bug,
since on amd64 the first argument to a function is generally not on the
stack.

Revert an old DTrace bug fix to some code that assumed that
sizeof(struct amd64_frame) == 16.

Reviewed by:	jhb, kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3255
2015-09-11 03:31:22 +00:00
markj
dfb0cc5c03 Merge stack(9) implementations for i386 and amd64 under x86/.
Reviewed by:	jhb, kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D3255
2015-09-11 03:24:07 +00:00
markj
3ff7032ecd MFV r283513:
5930 fasttrap_pid_enable() panics when prfind() fails in forking process
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bryan Cantrill <bryan@joyent.com>

illumos/illumos-gate@9df7e4e12e
2015-09-11 03:06:34 +00:00
markj
399d2d3d73 MFV r283512:
3599 dtrace_dynvar tail calls can blow stack
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Bryan Cantrill <bryan@joyent.com>

illumos/illumos-gate@d47448f09a
2015-09-11 03:04:24 +00:00
markj
34116761ff Remove the v_cache_min and v_cache_max sysctls. They are unused and have
no effect.

Reviewed by:	alc
Sponsored by:	EMC / Isilon Storage Division
2015-09-11 03:00:24 +00:00
imp
9fcb42ef36 dev_strategy and dev_strategy_csw are unused since r281825. Remove
them.

Differential Revision: https://reviews.freebsd.org/D3620
2015-09-11 00:38:58 +00:00
sjg
9567ee23d9 Handle default MAKEOBJDIR for META_MODE.
If MAKEOBJDIRPREFIX is set, use it for default OBJROOT.
If MAKEOBJDIR is empty or not a suitable value (no '/')
set a default that works.

Reviewed by: bdrewery
2015-09-11 00:19:49 +00:00
dteske
afdb464727 Fix argument quoting and remove unnecessary braces
MFC after:	3 weeks
X-MFC-to:	stable/10
2015-09-10 22:47:26 +00:00
delphij
650e74c9cc login.c doesn't really need libutil.h, don't include it.
login_fbtab.c includes paths.h and pathnames.h, and pathnames.h includes
paths.h.  Eliminate the paths.h inclusion in login_fbtab.c.

MFC after:	2 weeks
2015-09-10 22:25:40 +00:00
delphij
c4ba6d848b - Avoid accessing window properties directly, instead, use accessors.
This should be no-op for now, but allows the code to work if we
   move to NCURSES_OPAQUE.
 - Use calloc() instead of malloc+bzero.

MFC after:	2 weeks
2015-09-10 22:07:52 +00:00
jhb
ba1086b4fe Add a comment that to clarify how to determine the amount of received DDP
data.

Reviewed by:	np
Differential Revision:	https://reviews.freebsd.org/D3619
2015-09-10 21:41:11 +00:00
kib
98df6be028 Do not hold the process around the vm_fault() call from the trap()s.
The only operation which is prevented by the hold is the kernel stack
swapout for the faulted thread, which should be fine to allow.

Remove useless checks for NULL curproc or curproc->p_vmspace from the
trap_pfault() wrappers on x86 and powerpc.

Reviewed by:	alc (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-09-10 17:46:48 +00:00
mav
7ee575bcca Reimplement CTL High Availability.
CTL HA functionality was originally implemented by Copan many years ago,
but large part of the sources was never published.  This change includes
clean room implementation of the missing code and fixes for many bugs.

This code supports dual-node HA with ALUA in four modes:
 - Active/Unavailable without interlink between nodes;
 - Active/Standby with second node handling only basic LUN discovery and
reservation, synchronizing with the first node through the interlink;
 - Active/Active with both nodes processing commands and accessing the
backing storage, synchronizing with the first node through the interlink;
 - Active/Active with second node working as proxy, transfering all
commands to the first node for execution through the interlink.

Unlike original Copan's implementation, depending on specific hardware,
this code uses simple custom TCP-based protocol for interlink.  It has
no authentication, so it should never be enabled on public interfaces.

The code may still need some polishing, but generally it is functional.

Relnotes:	yes
Sponsored by:	iXsystems, Inc.
2015-09-10 12:40:31 +00:00
mav
1d4ff31d06 Remove unused target and initiator IDs. 2015-09-10 10:46:21 +00:00
tuexen
9701f78cf8 Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.

PR:		166483
Discussed with:	eadler@
MFC after:	4 weeks
2015-09-10 10:23:23 +00:00
mav
c134e00127 Disable CTL_IO_DELAY feature.
It is too developer-oriented to be enabled by default.
2015-09-10 09:27:22 +00:00
hrs
0529f0c80f Remove SIOCGDRLST_IN6 and SIOCGPRLST_IN6 forgotten in the previous commit.
MFC after:	3 days
2015-09-10 08:37:03 +00:00
hselasky
54343c967a Update USB quirk.
MFC after:	1 month
PR:		202968
2015-09-10 07:36:54 +00:00
hrs
812e52a6fb Use read to parse a line instead of set.
MFC after:	3 days
2015-09-10 06:56:56 +00:00
hrs
e9794a49ec - Add uid check.
- Report delay<0 as a warning.

MFC after:	3 days
2015-09-10 06:55:28 +00:00
hrs
d69b1ec3e0 Update only static routes when an interface is specified. This fixed
a bad side-effect reported in PR 202144.

PR:		202144
MFC after:	3 days
2015-09-10 06:47:23 +00:00