Commit Graph

213487 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
c8e10ea4ab Fix some trailing whitespaces.
MFC after:	1 month
2016-06-08 10:26:17 +00:00
Don Lewis
2b34ca7d10 Don't leak olinep if malloc() fails.
If malloc() fails to allocate linep, then free olinep (if it exists)
before returning to avoid a memory leak.

Reported by:	Coverity
CID:		1016716
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6755
2016-06-08 10:25:16 +00:00
Don Lewis
d7f12eacbb Don't leak addrinfo if ai->ai_addrlen <= minsiz test fails.
If the ai->ai_addrlen <= minsiz test fails, then freeaddrinfo()
does not get called to free the memory just allocated by getaddrinfo().
Fix by moving ai->ai_addrlen <= minsiz to a separate nested if
block, and keep freeaddrinfo() in the outer block so that freeaddrinfo()
will be called whenever getaddrinfo() succeeds.

Reported by:	Coverity
CID:		1273652
Reviewed by:	ume
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6756
2016-06-08 09:40:06 +00:00
Edward Tomasz Napierala
eb49a6d366 Last few instances of "sentence not on new line".
MFC after:	1 month
2016-06-08 09:36:07 +00:00
Edward Tomasz Napierala
7851d429a6 Fix a bunch of "sentence not on new line" warnings in section 9.
MFC after:	1 month
2016-06-08 09:19:47 +00:00
Edward Tomasz Napierala
2597250955 Fix a bunch of "sentence not on new line" warnings from igor(1).
MFC after:	1 month
2016-06-08 08:50:35 +00:00
Sepherosa Ziehau
51a9a000ee hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6745
2016-06-08 07:47:21 +00:00
Edward Tomasz Napierala
5c785643de Improve documentation for usfs(4) and usb_template(4).
Reviewed by:	hselasky (earlier version)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D6740
2016-06-08 07:39:55 +00:00
Edward Tomasz Napierala
8cf995b3bb Pacify igor(8) and make it easier to find via "man -k iser".
MFC after:	1 month
2016-06-08 07:36:00 +00:00
Edward Tomasz Napierala
1072c68c85 Add iser(4) manual page.
Obtained from:	Mellanox Technologies
MFC after:	1 month
2016-06-08 07:33:17 +00:00
Xin LI
a29af14de4 Apply mergemaster r255428:
Pass -n (do not emit comments) when saving mtree information for future
mergemaster(8) runs.

MFC after:	3 days
2016-06-08 06:33:55 +00:00
Sepherosa Ziehau
6523ab7e00 hyperv/vmbus: Busdma-fy MNF and event flags.
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6744
2016-06-08 05:34:22 +00:00
Don Lewis
4af86fb4f9 Explicitly NUL terminate the buffer filled by fread().
The fix in r300649 was not sufficient to convince Coverity that the
buffer was NUL terminated, even with the buffer pre-zeroed.  Swap
the size and nmemb arguments to fread() so that a valid lenght is
returned, which we can use to terminate the string in the buffer
at the correct location.  This should also quiet the complaint about
the return value of fread() not being checked.

Reported by:	Coverity
CID:		1019054, 1009614
MFC after:	1 week
2016-06-08 05:32:39 +00:00
Konstantin Belousov
3fc292d56b Old process credentials for setuid execve must not be dereferenced
when the process credentials were not changed.  This can happen if an
error occured trying to activate the setuid binary.  And on error, if
new credentials were not yet assigned, they must be freed to not
create the leak.

Use oldcred == NULL as the predicate to detect credential
reassignment.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
2016-06-08 04:37:03 +00:00
Marcelo Araujo
a9254de740 Bump date on ifconfig(8) and vlan(4) to reflect the changes made
on revision r301496.
2016-06-08 04:18:57 +00:00
Kevin Lo
45cbcf9b83 Fix a style bug. 2016-06-08 02:39:10 +00:00
Kevin Lo
5c95ab023c - Replace the magic numbers with something more readable.
- Reset DMA indexes after disabling DMA.
2016-06-08 02:37:23 +00:00
Don Lewis
290dadbd56 Fix a (false positive?) Argument cannot be negative coverity defect.
Rather than guarding close(fd) with an fd >= 0 test and setting fd
to -1 when it is closed to avoid a potential double-close, just
move the close() call after the conditional "goto make_token".  This
moves the close() call totally outside the loop to avoid the
possibility of calling it twice.  This should also prevent a Coverity
warning about checking fd for validity after it was previously passed
to read().

Reported by:	Coverity
CID:		1355335
MFC after:	1 week
X-MFC with:	r299484
2016-06-08 02:14:05 +00:00
Mariusz Zaborski
b3a734483e Introduce the PD_CLOEXEC for pdfork(2).
Reviewed by:	mjg
2016-06-08 02:09:14 +00:00
Mariusz Zaborski
920be817aa Add flags to the Casper services.
CASPER_SERVICE_STDIO - Casper will not close the first three descriptors (stdin,
		       stdout and stderr) this can be helpful for debugging.
CASPER_SERVICE_FD - Capser will not close all other descriptors, this can
		    be useful for a filesystem service.
2016-06-08 02:03:53 +00:00
Pedro F. Giffuni
311219368a libsupc++: Fix typo in symbol map.
This went mostly unnoticed with the deprecation of the GNU toolchain
in tier 1 platforms. Fix it now for the rest.

PR:		169901
MFC after:	3 days
2016-06-08 00:29:48 +00:00
Pedro F. Giffuni
633785280d ext2fs: Stop dropping and reacquiring Giant around geom calls.
As in UFS r300366.
2016-06-07 21:40:42 +00:00
Conrad Meyer
75548271a9 Fix memory leaks in (a|)daregister introduced in r298002
In the case where cam_iosched_init() fails, the ada and da softcs were leaked.
Instead, free them.

Reported by:	Coverity
CID:		1356039
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:33:55 +00:00
Conrad Meyer
0d0338afc9 iflib: Improve cleanup on iflib_queues_alloc error path
Fix some memory leaks.  Some may remain.

Reported by:	Coverity
Discussed with:	mmacy
CIDs:		1356036, 1356037, 1356038
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:26:00 +00:00
Conrad Meyer
ab8316b8df nfs_clvfsops: Fix leading whitespace introduced in r299848
Replace spaces with tabs.  No functional change.

Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:16:01 +00:00
Andrew Turner
04ff877e4c Switch arm64 to use intrng by default. The old interrupt handling code can
still be used, however this is expected to be removed soon.

Obtained from:	ABT Systems Ltd
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2016-06-07 20:14:08 +00:00
Conrad Meyer
15634fd60c nfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs
If strlen(hostp) was zero, the stack array 'nam' would never be initialized
before being strdup()ed.  Fix this by initializing it to the empty string.

It's possible some external condition makes this case impossible, in which
case, an assertion instead of this workaround is appropriate.

Introduced in r299848.

Reported by:	Coverity
CID:		1355336
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:00:20 +00:00
Conrad Meyer
16fb86ab35 iflib: Fix potential leak in iflib_if_transmit
Due to an accidental mismatch between allocation and release in the slow path
of iflib_if_transmit, if a caller passed 9-16 mbufs to the routine, the mbuf
array would be leaked.

Fix the mismatch by removing the magic numbers in favor of nitems() on the
stack array.  According to mmacy, this leak is unlikely.

Reported by:	Coverity
Discussed with:	mmacy
CID:		1356040
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 19:49:08 +00:00
Conrad Meyer
00ee4cd78a Fix a minor leak in ACPI thermal
Introduced in r301518.

Reported by:	Coverity
CID:		1356266
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 19:08:13 +00:00
Andrew Turner
8a77146289 Start to clean MIDR values using the CPUID scheme. We don't need to know
the exact CPU we are running on to set the cpu functions. Relax the check
to ignore the CPU revision. Even so this may still be too specific.

Reviewed by:	mmel
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D6504
2016-06-07 18:50:36 +00:00
Pedro F. Giffuni
2e621997eb ext2fs: rearrange ext4_bmapext().
While here assign error a bit later.

Reviewed by:	Damjan Jovanovich
Obtained from:	NetBSD
2016-06-07 18:23:22 +00:00
Pedro F. Giffuni
96e9f46789 ext2fs(5): Cosmetic cleanups, mostly to the ext4 code.
Obtained from:	NetBSD
2016-06-07 17:08:34 +00:00
Takanori Watanabe
b32073c458 Disconnect LE socket when the HCI connection associated is disconnected. 2016-06-07 16:57:13 +00:00
Kurt Lidl
04a83165f2 Bump dates in blacklist related manpages
Reported by:	araujo
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:51:56 +00:00
Kurt Lidl
c0a3f8db90 Document BLACKLIST related build options
Reported by:	bdrewery
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:35:55 +00:00
Kurt Lidl
c0759dac0d Separate BLACKLIST vs BLACKLIST_SUPPORT properly
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:31:03 +00:00
Kurt Lidl
9349564fec Note blacklist support first appeared in FreeBSD 11
Reported by:	jbeich
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:26:34 +00:00
Kurt Lidl
c0cc364181 Add blacklist support to sshd
Reviewed by:	rpaulo
Approved by:	rpaulo (earlier version of changes)
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5915
2016-06-07 16:18:09 +00:00
Pedro F. Giffuni
3707d4d3e3 ng_mppc(4): Bring netgraph(3) MPPC compression support.
Documentation change missing from r301549.
2016-06-07 15:20:53 +00:00
Pedro F. Giffuni
c3fb425204 ng_mppc(4): Bring netgraph(3) MPPC compression support.
Support for compression has been available from July 2007 but it
was never imported due to concerns with patents once held by
STAC/HiFn. The issues have clearly been resolved so bring it
in now.

Special thanks to Brett Glass for preserving the code and
pointing documentation for the expiration case.

Obtained from:	mav (through Brett Glass)
Relnotes:	yes
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6739
2016-06-07 15:07:00 +00:00
Pedro F. Giffuni
43ce40e891 ext2fs: cleanup generation number management.
Ext2/3/4 manages generation numbers differently than UFS so adopt
some rules that should work well. When allocating a new inode,
make sure we generate a "good" random value specifically avoiding
zero.

Don't interfere with the numbers that are already generated in
the filesystem: ext2fs doesn't have the backwards compatibility
issues  where there were no generation numbers.

Reviewed by:	kevlo
MFC after:	1 week
2016-06-07 14:37:43 +00:00
Steven Kreuzer
537f1d275f Document 300779, Dummynet AQM version 0.2.1
Approved by:	re (gjb, implicit, relnotes)
2016-06-07 14:11:15 +00:00
Hans Petter Selasky
76a5241f2c Add SR-IOV guest support to the mlx5en driver.
This patch adds the missing pieces needed for device setup using the
mlx5en driver inside a virtual machine which is providing hardware
access through SR-IOV.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-06-07 13:58:52 +00:00
Hans Petter Selasky
d8571d3ea3 Fallback to arc4rand() in the LinuxKPI when read_random() returns
zero. This can happen for virtual machines.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-06-07 13:10:13 +00:00
Svatopluk Kraus
c4263292fe Remove temporary solution for storing interrupt mapping data as
it's not needed after r301451 and follow-ups r301453, r301539.

This makes INTRNG clean of all additions related to various buses.
2016-06-07 09:03:27 +00:00
Navdeep Parhar
468646f716 cxgbe(4): A couple of fixes to set_sched_queue.
- Validate the scheduling class against the actual limit (which is chip
  specific) instead of a magic number.

- Return an error if an attempt is made to manipulate the tx queues of a
  VI that hasn't been initialized.

Sponsored by:	Chelsio Communications
2016-06-07 07:48:36 +00:00
Marcelo Araujo
1830617ec9 Bump date in both manpages.
Reported by:	rodrigc
2016-06-07 07:04:05 +00:00
Navdeep Parhar
0bc01d66b6 cxgbe(4): Provide information about traffic classes in the sysctl mib.
Sponsored by:	Chelsio Communications
2016-06-07 06:42:35 +00:00
Michal Meloun
949883bd72 INTRNG: As follow up of r301451, implement mapping and configuration
of gpio pin interrupts by new way.

Note: This removes last consumer of intr_ddata machinery and we remove it
in separate commit.
2016-06-07 05:08:24 +00:00
Sepherosa Ziehau
36ad8372d4 net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by:	hps, erj, tuexen
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6688
2016-06-07 04:51:50 +00:00