Release the new znode when its ZIL commit fails
Since 967b15b88 ("ZIL: allow zil_commit() to fail with error"),
zfs_create(), zfs_mkdir() and zfs_symlink() return the result of the
zil_commit() they issue on a sync=always dataset, and since 72602f6ad
("ZIL: "crash" the ZIL if the pool suspends during fallback"), both
from #17398, that result is EIO when the pool suspends during the
commit with failmode=continue. These functions set *zpp to the held
znode before the commit, and their callers only take the znode over on
success, so the error leaks the reference: the inode is never evicted,
a removed entry stays on the delete queue, and a later unmount spins
forever in zfsvfs_teardown() waiting for z_all_znodes to drain. On
FreeBSD the leaked vnode is also left locked.
Set *zpp only once the commit succeeded, and release the znode
otherwise, unlocking the vnode first on FreeBSD. The entry itself is
kept: the transaction that created it is already committed and cannot
be undone on a suspended pool, and zfs_write() and zfs_fsync() likewise
return EIO for a change that stays applied.
[8 lines not shown]
zed: fix zpool handle leaks in zfs_retire agent
is_draid_fdomain_failure() looks up the pool twice per try, up to four
tries, via find_by_guid_impl(), but never closes the returned
zpool_handle_t. Since it is called for every removed/faulted vdev,
regardless of the pool type (the "not dRAID" check happens after the
handles are opened), zed leaks two pool handles, including their config
nvlists, on every such event, and up to eight when a dRAID with failure
domains is not (yet) in a domain failure state. The nfaults_map buffer
was also leaked on the early returns.
Rework it to open the pool only once per try, look up the top-level
vdev in the same config snapshot, and close the handle at the end of
each try. Also guard against a zero top-level guid, which previously
left nvtop uninitialized.
zfs_retire_recv() had similar leaks:
- In the resource.fs.zfs.removed/statechange path, the early returns
[20 lines not shown]
[libc] Add POSIX-mandated transitive header inclusion to three headers. (#237436)
Per POSIX standard:
* `<sys/sem.h>` shall include the `<sys/ipc.h>` header
* Inclusion of the `<threads.h>` header shall make
symbols defined in the header `<time.h>` visible.
* Inclusion of the `<pthread.h>` header shall make symbols
defined in the headers `<sched.h>` and `<time.h>` visible.
There are real-world programs which correctly rely on this
behavior.
Implement all of the above using `public_includes` feature in YAML
config
to add transitive inclusions to generated headers. Technically speaking,
we can "make symbols visible" using other mechanisms, but simple
transitive inclusion is by far the easiest one.
iavf: Reconcile VLAN filters with acknowledged requests
Track desired and acknowledged VLAN membership separately. Retain
pending deletions and uncertain state after failed requests instead of
losing the work when a message is submitted. Make repeated registration
idempotent.
Adapt DPDK's synchronous, single-VID virtchnl request shape and the
bounded desired-state reconciliation used by igbv and ixv. Serialize
VLAN requests under the existing virtchnl mutex, with filter-list
changes under the iflib context lock. Preserve an unresolved
transaction so a late reply cannot be mistaken for a newer operation,
including after the desired state changes.
Reconcile live membership changes without restarting healthy queues.
Limit each pass to 32 requests and a one-second reply deadline,
continuing live batches from the admin task. Down or recovering VFs
apply desired state at initialization; initialization batches continue
through the existing retry callout without rediscovering the mailbox or
[14 lines not shown]
[MachineOutliner] Skip returns_twice functions (#237875)
fixes: #237874
If a function returns twice, or calls a function that can return twice,
skip it. The context saved by functions such as `setjmp` will be
different if they take place within an outlined function. Ex: Saved
stack pointer will be different.
Was able to trigger a crash by outlining a call to a returns_twice
function.
Reject receive transfers whose descriptor frame length exceeds the data
actually transferred. The descriptor carries a 12-bit frame length and
the chip accepts frames up to 4095 bytes, but a receive transfer only has
MCLBYTES minus the descriptor for frame data.
Trusting the descriptor produced an mbuf extending past its cluster.
A fragmented IPv4 datagram then carried it into m_cat(), where a default
kernel panics on a DIAGNOSTIC assertion.
Report and diff from Acts1631.
ok miod@ claudio@ kettenis@
[clang][NFC] Test Linux/Windows Multilib Resource Dirs (#238147)
This is another follow-up to 78820cb91605693b7d768be4ebc8b66181d3e9c3 to
show the behaviour of resource dir resolution after that change.
Assisted-by: AI
x11-themes/ventanas-10: New port: Openbox theme with a look similar to Windows 10
Ventanas-10 is a fork of the B00merang-Project's Windows-10 theme,
but with the following differences:
- The minimize, close, and maximize buttons change color when you
hover over them.
- Dark mode only.
- For Openbox only.
- The max_toggled.xbm image has been implemented to give it a look
similar to Windows 10.
WWW: https://github.com/dtxdf/Ventanas-10/
x11-fonts/selawik: New port: Selawik is an open source replacement for Segoe UI
Selawik is an open source replacement for Segoe UI, the default
system font used in Windows. It is metrically compatible with Segoe UI,
which means that switching between the two fonts will not alter the
layout of documents or interfaces.
WWW: https://github.com/microsoft/Selawik
x11-wm/devilspie2-devel: New port: Window manipulation tool
Devilspie2 is a window-matching utility, allowing the user to perform
scripted actions on windows as they are created. For example, you can
script a terminal program to always be positioned at a specific screen
position, or position a window on a specific workspace.
Devilspie2 is based on the program Devilspie by Ross Burton. The
difference is that Devilspie2 has replaced the symbolic expressions of
the original with a Lua interpreter, making it much easier to maintain
and extend.
Please note that the rules of Devilspie2 are not compatible with the
symbolic expressions of the original Devilspie.
WWW: https://www.nongnu.org/devilspie2/
Join short wrapped RUN lines
Removing -verify-machineinstrs shortened these RUN lines enough to fit
on a single line of at most 100 columns.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
Restore indentation of wrapped RUN line continuations
Removing -verify-machineinstrs from the start of a continuation line
also dropped its indentation.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
CodeGen: Remove -verify-machineinstrs from llc -passes MIR tests
With the new pass manager, -verify-machineinstrs does not add a
verifier after each pass; only -verify-each does. Bizarrely, instead
it suppresses the verifier llc runs at the end of the pipeline, so
removing it enables verification of the output. This is probably a
bug, but I think the plan is to replace this flag in the new PM
anyway.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Remove -verify-machineinstrs from single -run-pass MIR tests (#238144)
Since #228248 / 66366908, llc verifies MIR output by default. MIR
inputs were always verified so for an llc invocation running exactly
one pass with -run-pass, the -verify-machineinstrs flag does nothing
so these flags are pointless. We should more aggressively trim
-verify-machineinstrs uses in the future, but this covers the cases
that don't change behavior. This removal was performed by generated
script.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[InstCombine] Preserve select weights when sinking frexp through a select (#237367)
foldFrexpOfSelect rebuilds the operation using the original condition
and a constant mantissa value. Copy the original select's branch weights
to the replacement to preserve profiling information.
RuntimeLibcalls: Handle int and long size more similarly
Previously we eagerly computed the int size and passed it through all
the various functions to get the type signature. The long cases were
evaluated in the context that need a long. Treat these the same way
which reduces the number of arguments passed around.