netmap: Clear ni_bufs_head in a new netmap_if
netmap_mem2_if_new() does not set ni_bufs_head, and the netmap_if comes
from a pool that is not zeroed, so it starts with the head of the last
extra buffer list of whoever had that netmap_if before. Only a
registration from userspace sets the field afterwards. One made by the
kernel, such as attaching a NIC to a VALE switch, keeps the old value,
and so does a registration that fails after the netmap_if was created.
netmap_mem2_if_delete() then frees that list again. When the buffer is
free this logs "ouch, double free on buffer"; when another ring has got
it in the meantime, it is freed under that ring and can be given out a
second time.
Clear the field when the netmap_if is created.
Reviewed by: vmaffione
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D62152
[clang-tidy] Respect explicit(false) on conversion operators (#240521)
Commit eb3b063995d6 (#82689) taught `ExplicitConstructorCheck`
(`misc-explicit-constructor`, aliased as `google-explicit-constructor`
and `cppcoreguidelines-explicit-constructor`) to ignore C++20
`explicit(false)` and instantiation-dependent `explicit(...)`
expressions on constructors, and to diagnose non-literal `false`
expressions without emitting an invalid `explicit` fix-it.
However, the `CXXConversionDecl` branch still unconditionally warned on
any conversion operator where `isExplicit()` was false and suggested
inserting `explicit `, even when `explicit(false)` or a dependent
`explicit(...)` specifier was already written. Apply the same
`ExplicitSpecifier` inspection to conversion operators so deliberately
implicit C++20 `explicit(false)` and dependent `explicit(...)`
conversion operators are not diagnosed.
Assisted-by: Gemini
[Attributor] Merge the scopes of potential values with a `|=`
`recurseForValue` merges the scopes of a value with `+=`. If a value appears
more than once in the values of one scope, the sum is not a valid scope.
This PR was assisted by AI but I reviewed all the changes.
xprt_verbs.c: Don't reset the connection for all failure stats
Without this patch, rpcrdma_unmap() fails the RDMA connection
for all RPC stat returns other than RPC_SUCCESS.
This patch allows the connection to remain for certain failures:
- RPC_AUTHERR, which can happen when a Kerberos TGT expires.
- RPC_INTR, RPC_TIMEDOUT, which can happen for "intr" or "soft"
mounts.
Reported by: llm-postcr
MFC after: 1 month
Fixes: 80bee4d83637 ("nfsclrdma: Add code to support client side NFS over RDMA")
[RegAllocFast] Keep inline asm uses off a tied physical def's register (#246907)
```
%1:gr32 = MOV32ri 0
INLINEASM ..., def %2, implicit-def $ecx, %0(tied-def 3), %0(tied-def 5), %1
$edx = COPY %0
```
%0 is used after the asm, so both tied uses are copies of it. %1 is
assigned $ecx, and the copy into $ecx overwrites it:
```
renamable $ecx = MOV32ri 0
$eax = COPY $edx
$ecx = COPY $edx
INLINEASM ..., killed renamable $ecx
```
lowerTiedUse frees the tied def's register after inserting the copy. A
[4 lines not shown]
[Sparc][MC] Don't report "unexpected token" after an operand error (#245208)
When an operand failed to parse, parseInstruction always reported
"unexpected token", even when the operand parser had already reported a
more specific error. So most operand errors were followed by a second,
less useful one, e.g.:
```
error: invalid register name
error: unexpected token
```
Make the operand parsers follow the ParseStatus convention, where
Failure means an error was reported and NoMatch means nothing was
consumed and no error was reported, and only report "unexpected token"
for NoMatch:
- parseSparcAsmOperand returns NoMatch for tokens it does not handle,
and Failure only after an error.
[19 lines not shown]