Commit Graph

274476 Commits

Author SHA1 Message Date
Baptiste Daroussin
4fea9c7cfe update to 2022-03-22 2022-04-14 16:16:03 +02:00
Cy Schubert
1e0ca65a3b wpa: Correctly call pcap_next_ex()
The second argument to pcap_next_ex() is a pointer to a pointer.
Not a pointer. This fixes a wpa_supplicent SIGSEGV.

PR:		263266
Reported by:	Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Fixes:		6e5d01124f
MFC:		immediately
2022-04-14 06:16:45 -07:00
Gordon Bergling
3e0f3678ec time(3): Refine history in the manual page
The time() system call first appeared in Version 1 AT&T UNIX.  Through
the Version 3 AT&T UNIX, it returned 60 Hz ticks since an epoch that
changed occasionally, because it was a 32-bit value that overflowed in a
little over 2 years.

In Version 4 AT&T UNIX the granularity of the return value was reduced to
whole seconds, delaying the aforementioned overflow until 2038.

Version 7 AT&T UNIX introduced the ftime() system call, which returned
time at a millisecond level, though retained the gtime() system call
(exposed as time() in userland).  time() could have been implemented as a
wrapper around ftime(), but that wasn't done.

4.1cBSD implemented a higher-precision time function gettimeofday() to
replace ftime() and reimplemented time() in terms of that.

Since FreeBSD 9 the implementation of time() uses
clock_gettime(CLOCK_SECOND) instead of gettimeofday() for performance
reasons.

With most valuable input from Warner (imp@).

Reviewed by:	0mp, jilles, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34751
2022-04-14 10:04:14 +02:00
Navdeep Parhar
239170f292 cxgbe(4): Fix control flow issues reported by Coverity.
CID 1487932:  Control flow issues  (NESTING_INDENT_MISMATCH).
The macro on this line expands into multiple statements, only the first
of which is nested within the preceding parent while the rest are not.
9828                    ulp_region(RX_TLS_KEY);

Reported by:	Coverity (CID 1487932)
Fixes:	f88b31885c cxgbe(4): meminfo should get the TLS region's limits from the hardware.
MFC after:	3 days
Sponsored by:	Chelsio Communications
2022-04-14 00:17:36 -07:00
Gordon Bergling
7fa5cd3827 Revert "drm2: Fix a typo in a source code comment"
This reverts commit 5158cf0a38.
2022-04-14 09:01:29 +02:00
Peter Holm
1346766f60 stress2: Permanently disable disruptive tests 2022-04-14 06:57:24 +02:00
Konstantin Belousov
bf13db086b Mostly revert a5970a529c: Make files opened with O_PATH to not block non-forced unmount
Problem is that open(O_PATH) on nullfs -o nocache is broken then,
because there is no reference on the vnode after the open syscall exits.

Reported and tested by:	ambrisko
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-04-14 02:47:04 +03:00
John Baldwin
a30eb84a5d powerpc mpc85xx: Remove unused variables. 2022-04-13 16:08:24 -07:00
John Baldwin
1c311640c0 powerpc: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
dd636cb9d0 ad7417: Avoid an unused but set warning when compiled with NO_SYSCTL_DESCR.
Use a ternary operator for the description string passed to
SYSCTL_ADD_PROC instead of a helper variable.
2022-04-13 16:08:23 -07:00
John Baldwin
2257e87203 dpaa: Remove unused variables. 2022-04-13 16:08:23 -07:00
John Baldwin
39f7de587b divert_packet: ip is only used for SCTP. 2022-04-13 16:08:23 -07:00
John Baldwin
fe5324aca0 in_pcballoc: error is only used for IPSEC or MAC. 2022-04-13 16:08:23 -07:00
John Baldwin
36fb372264 kern: Move variables only used for MAC under #ifdef MAC. 2022-04-13 16:08:23 -07:00
John Baldwin
a56881d3e9 riscv: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
695d3e52ea xdma: Inline variables with simple values used once in a KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
d586fc165c i386 getmemsize: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
8bf0d2d3e3 arm64 rk_pcie: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
216536350a vnic: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:23 -07:00
John Baldwin
4aec198420 sched_ule: Inline value of ts in sched_thread_priority.
This avoids a set but unused warning in kernels without SMP where
TDQ_CPU() doesn't use its argument.
2022-04-13 16:08:23 -07:00
John Baldwin
718fe5ddfa ata-fsl: Remove unused variable. 2022-04-13 16:08:23 -07:00
John Baldwin
43629a8b18 arm freescale: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin
9ad5422f27 arm sp804: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin
09f2892eee arm vybrid: #if 0 variables only used under #if 0. 2022-04-13 16:08:22 -07:00
John Baldwin
42278fc2e6 drm2: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin
fcd0ea3a38 if_mvneta: Use __diagused for a variable only used in KASSERT(). 2022-04-13 16:08:22 -07:00
John Baldwin
e6fd5ca545 xdma pl330: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin
0a4089c734 gpio tca6416: Remove unused variable. 2022-04-13 16:08:22 -07:00
John Baldwin
ead64e8454 flash: Remove unused variables. 2022-04-13 16:08:22 -07:00
John Baldwin
e19883539a hwpmc: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:22 -07:00
John Baldwin
34dae08e6c linuxkpi: Use an inline function for the _ioremap_attr stub.
This "consumes" variables passed to ioremap*() avoiding set but unused
warnings.
2022-04-13 16:08:22 -07:00
John Baldwin
69c595ed7f arm: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:22 -07:00
John Baldwin
e4746e3fe4 bcm2835_systimer: Remove unused variable. 2022-04-13 16:08:22 -07:00
John Baldwin
8758ac757f sched_4bsd: ts is only used in sched_bind for SMP. 2022-04-13 16:08:22 -07:00
John Baldwin
d101d57321 arm dbg: Use PCPU_GET(cpuid) directly in assertions. 2022-04-13 16:08:21 -07:00
John Baldwin
4046178557 ipsec_encap: setdf is only used for INET. 2022-04-13 16:08:21 -07:00
John Baldwin
f328c46fdd TCP sysctl handlers: fin and lin are only used for INET. 2022-04-13 16:08:21 -07:00
John Baldwin
700a395c58 tcp_log_vain/addrs: Use a const pointer for the IPv4 header.
The pointer to the IPv6 header was already const.
2022-04-13 16:08:21 -07:00
John Baldwin
13ec6858d6 tcp_log_addr: ip is only used for INET. 2022-04-13 16:08:21 -07:00
John Baldwin
3320ca1205 ipfw: icmp6_type is only used for INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
75095cd38f mlx5: fs_tcp is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
29a843177e sctp: #ifdef INET-only and INET6-only variables.
Duplicating the SCTP_PCB_FLAGS_BOUND_V6 check made the #ifdef's
simpler than applying #ifdef's directly to the original code.  Modern
compilers should cache the result rather than testing the flag twice.
2022-04-13 16:08:21 -07:00
John Baldwin
ac3e46fa3e infiniband_resolve_addr: ih is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
2fdf3ed1e3 ng_netflow: Move various variables under INET || INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
d98981585c ether_resolve_addr: eh is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
127b40e7dc vtnet: offset is only used for INET or INET6. 2022-04-13 16:08:21 -07:00
John Baldwin
2884a93651 vlan: ifa is only used under #ifdef INET. 2022-04-13 16:08:21 -07:00
John Baldwin
a95c70012b zfs: Disable -Wunused-but-set-variable for dnode.c.
dn is only used by DNODE_VERIFY (conditional on ZFS_DEBUG) in
dnode_special_open.
2022-04-13 16:08:20 -07:00
John Baldwin
ffd8101e93 usb: Add a __usbdebug_used for variables only used under #ifdef USB_DEBUG.
Use it for various variables only used in DPRINTF debug traces
conditional on USB_DEBUG.
2022-04-13 16:08:20 -07:00
John Baldwin
1c5f188212 usb: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:20 -07:00