t_sigio: New test of various SIGIO cases.
PR kern/59056: poll POLLHUP bugs
PR kern/60782: SIGIO says socket ready for send before send does
PR kern/60783: tty: missing siginfo_t in SIGIO
PR kern/60784: pty doesn't deliver SIGIO when writable
PR kern/60785: fifo delivers SIGIO with wrong si_fd
improve routing code in NPF
duplicate packet and end copy of the packet and locally manage original.
return false always to keep it in procedures returns.
Unbreak build when KGDB is defined.
Add extern reference to kernel_pmap_
Remove mutex calls since no mutex is present in the pmap struct,
since pseg_get() has its own internal locking logic.
Import jemalloc 5.4.0 (previous was 5.3.1)
* 5.4.0 (Sep 17, 2026)
This release contains over 160 commits, focusing on the technical debts
cleaning including refactorings, bug fixes, test coverage improvement, and
option cleanups. The release also includes portability improvements per
upstream issues report.
New features:
- Add `EXTENT_ALLOC_FLAG_PINNED` so custom extent-allocation hooks can
mark non-reclaimable mappings, such as HugeTLB pages, for preferential
reuse outside the decay and purge pipeline. Add the mallctl interfaces
`stats.pinned`, `stats.arenas.<i>.pinned`,
`stats.arenas.<i>.extents.<j>.npinned`,
`stats.arenas.<i>.extents.<j>.pinned_bytes`, and
`stats.arenas.<i>.mutexes.extents_pinned.{counter}` to report
pinned-memory usage and mutex statistics. (@binliu19: be2de8cc)
- Allow resuming per-CPU arena selection via `thread.arena`.
[86 lines not shown]
mips: tag all the stub functions as __noubsan
When built with UBSAN the stub functions change to the point that the
mips_fixup_addr code doesn't understand the instructions involved.
Apply __nousbsan to avoid this.
PR//60779: Kernel complains about unexpected mips insn on boot...
t_mkfifo: Bump timeouts a little bit to exercise the race better.
Currently on the releng testbed, the parent's open() call is not
failing with _any_ EINTR, presumably because (a) the child is opening
the fifo before any itimer alarms fire and then (b) signal no longer
causes the parent's open() to fail once the child has opened the other
end of the fifo. So let's give the parent a bit more of a head start,
and run the race a little longer.
PR kern/59578: open() hangs indefinitely on FIFO with frequent signal
interruption
re(4): fix mangled TX queue on DMA map loading errors
Do not advance the TX queue producer index when bus_dmamap_load_mbuf()
fails.
The producer index must advance only after a packet has been
successfully committed to a TX queue entry. Advancing it on a
map loading error leaves a hole in re_txq[], while re_txq_free()
still counts only successfully queued packets.
re_txeof() assumes that all outstanding TX queue entries from
re_txq_considx are contiguous, so such a hole can make it process
an unused entry and corrupt the TX queue accounting.
This bug was introduced by my re_encap() -> re_start() refactoring
in rev. 1.59 back in 2006. Sorry it took ~20 years to notice it.
Should be pulled up to netbsd-11 and netbsd-10.
Revert "turnstile(9): Fix priority inheritance if trylock requires restart."
This was originally done in an attempt to resolve the issue described
in:
PR kern/60739: Turnstile priority inheritance short-circuits walking
of waiter chain when trylock fails
But it may have broken other things:
PR kern/60776: reproducable assertion failure with today's current
> Today's amd64 kernel reproducably crashes for me when running build.sh.
>
> [ 4043.4787057] panic: kernel diagnostic assertion "lwp_eprio(l) >= ts->ts_eprio" failed: file "../../../../kern/kern_turnstile.c", line 356
> [ 4043.6286910] cpu1: Begin traceback...
> [ 4043.6686907] vpanic() at netbsd:vpanic+0x189
> [ 4043.7186903] kern_assert() at netbsd:kern_assert+0x4b
> [ 4043.7786898] turnstile_wakeup() at netbsd:turnstile_wakeup+0x2c5
[10 lines not shown]
t_fdrestart: Test named fifos too.
Turns out we're missing a wakeup on close for read and write on fifos
too!
PR kern/57659: closing pipe writefd fails to wake concurrent write on
same writefd
t_fdrestart: Test restarting poll and select on close too.
They must promptly report POLLNVAL/EBADF when a file descriptor they
are listening for is closed, just like read and write.
Note: kevent doesn't get restarted when an fd registered with it is
closed; the registration is simply silently discarded instead. Hence
no corresponding kevent tests here.
PR kern/57659: closing pipe writefd fails to wake concurrent write on
same writefd
t_poll: Rename tests pollclosed -> pollclosedpeer.
These test what happens when we're polling a file descriptor for some
two-ended thing (pipe, fifo, socket, pty) and the _other_ end is
closed. This is to prepare for adding a suite of tests for when
_this_ end is closed, which I'll reuse the name `pollclosed' for.
Prompted by:
PR kern/59056: poll POLLHUP bugs
t_poll: Fix delayed_write checks.
1. Check the results of the poll(2) call that sleeps, not a
zero-timeout call instead -- not sure how that crept in.
2. Do also check a zero-timeout call at the end to make sure the
event state is persistent.
PR kern/59056: poll POLLHUP bugs
Use new macros, LFS_RELEASEIENTRY and LFS_RELEASESEGENTRY, to release the
buffers obtained from LFS_IENTRY and LFS_SEGENTRY. The macros replace
calls to brelse() and (at this point) resolve to brelse().
No functional change.