mlx5: postpone freeing the completed command entity to taskqueue
because cancel_delayed_work_sync() might need to sleep, which cannot be
done in the interrupt thread where the completion runs.
Sponsored by: Nvidia networking
MFC after: 1 week
queue.h: Reorder STAILQ_INSERT_TAIL
The current implementation briefly violates the tail invariant. This
is not usually an issue, but if an insert is in flight when a panic
occurs, we may then trip the invariant while dumping core.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: obiwac, olce, jhb
Differential Revision: https://reviews.freebsd.org/D55819
(cherry picked from commit aa15df4597053c0e95a15b2a7036296999cd562a)
resolver.5: document six previously undocumented options
Document the edns0, inet6, insecure1, insecure2, no-check-names,
and rotate options which are parsed by res_init(3) but were not
described in the resolver(5) man page.
MFC after: 1 week
Signed-off-by: Christos Longros <chris.longros at gmail.com>
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D55864
(cherry picked from commit 462a1f6197fa3de63e0eca2835b1d5b0bc6a3bbb)
yes: Completely overengineer
If we're going to overengineer this, we may as well go all the way.
* If multiple arguments are given, concatenate them into a space-
separated list like GNU coreutils does.
* When duplicating the expletive, do so exponentially.
* Most importantly, don't modify the memory that argv points to.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D55617
(cherry picked from commit cf74b63d61b49db848ecc20b87e7ee5f16671320)
yes: Add missing header
[8 lines not shown]
pfctl tests: test rdr-to and nat-to in one rule
OpenBSD fixed this separately (in their 6a338f3f70). We appear to not
have had this bug, but test for it anyway.
Sponsored by: Rubicon Communications, LLC ("Netgate")
pfctl: parser must not ignore error from pfctl_optimize_ruleset()
Ignoring the error may cause pfctl(8) to load inconsistent ruleset
preventing pf(4) to enforce desired policy.
Issue reported and fix suggested by berts _from_ fastmail _dot_ com
'Looks good.' @deraadt
MFC after: 1 week
Obtained from: OpenBSD, sashan <sashan at openbsd.org>, 9fd28a8cca
Sponsored by: Rubicon Communications, LLC ("Netgate")
release.sh: add chroot cleanup routine
The chroot_cleanup routine handles any cleanup needed post-chroot_setup,
etc. This consists of purely tearing down `${CHROOTDIR}/dev` today, but
might involve additional steps, as needed for custom functions. This
allows end-users to override the various chroot functions without having
to modify code in main() or replicate the unmount procedure in an
equivalent routine setup via the trap builtin.
This change modifies the /dev unmount process to use `umount -f` instead
of `umount`. The latter can result in failures if resources are still
mounted or are running post-build, whereas the former will clean up any
resources still in use by processes running in the chroot at time of
build. Moreover, the `chroot_cleanup` routine is now called when the
script is killed with `SIGINT` and `SIGTERM`, as well as at `EXIT`,
better ensuring that the script's resources are cleaned up in relatively common
scenarios that can be detected/handled.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
release.sh: document user-overriddable functions
This helps others attempting to customize the behavior of `release.sh`.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
libc: Fix cxa_thread_atexit{,nothr} test.
After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.
Reported by: siva
Reviewed by: kib
Approved by: markj (mentor)
Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893
hwpstate_amd: Refactor the cpufreq code by using delegation pattenr
We separate the code of CPPC and legacy pstate driver to make it easier
to read.
Reviewed by: olce
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55604
diff3: Produce correct exit status
Use exit status 2 for errors, 1 only to indicate that differences were
found between the inputs (in some operating modes).
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: ngie, bapt
Differential Revision: https://reviews.freebsd.org/D55608
(cherry picked from commit fe5341287c6c9bacc18879b25ed72ceb42e1c811)
diff3: Code cleanup
* Order includes.
* Turn the diff type into an enum.
* Turn an unreachable error message into an assertion.
* Remove unused debugging code.
* Remove some dead assignments.
* Consistently use 1 instead of EXIT_FAILURE.
* Turn a return from main() into an exit().
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bapt
[3 lines not shown]
diff3: fix diff3 -A
for cases where file2 differs but file1 and file3 agrees, the code
stored the file2 and file3 line numbers in the de[] editing script
entries but used them as if they were file1 line numbers.
Reviewed by: thj
Differential Revision: https://reviews.freebsd.org/D55276
(cherry picked from commit 8d442cf32e4fb29fbb85090ac29d32d1e30fd824)
diff3: fix merge mode
Make the merge mode compatible with GNU diff3
Add tests for all the changes, those tests are extracted from the
etcupdate testsuite.
This version passes the etcupdate testsuite and the diffutils diff3
test suite.
MFC After: 1 week
(cherry picked from commit 2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b)
libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC
This change modifies the libcrypto PIC objects to always compile with
`-DOPENSSL_PIC -fPIC` to restore parity with the upstream build process.
This ensures that the legacy provider is built with parity to the
upstream legacy provider.
MFC after: 12 days
Tested with: `make check` (legacy provider), `make universe`
Fixes: 14b9955e
Differential Revision: https://reviews.freebsd.org/D44896
nfs_clstate.c: Handle the same stateid case correctly
When an NFSv4.1/4.2 sarver upgrades a read delegation to
a write delegation, it does not need to change the
delegation's stateid.
Without this patch, a DELEGRETURN of the stateid was done
for the case where the delegation stateid had not changed.
This return was bogus, since the delegation stateid now
represents the new write delegation.
This patch fixes the priblem by checking for "same stateid"
and only doing the DELEGRETURN when it is not the same.
PR: 289711
(cherry picked from commit 016570c4463d5908953355ee1cf9a385ad9601b4)