diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-10-20 15:37:53 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-20 15:37:54 -0700 |
| commit | d53a5309cc4a874d2686b1ad35f1ab17f84ef1ec (patch) | |
| tree | a9bd597b1907ab09ade201c92b682236af45d1fe /tools/lib/python/kdoc/python_version.py | |
| parent | 5ed6ab32767c6e957eeecc0b9924e8d0e0758ec0 (diff) | |
| parent | 9486c89a8e157cedecfb561c3d86053e654d32ab (diff) | |
Merge branch 'ibmveth-fix-hangs-use-after-frees-and-netpoll-races'
Mingming Cao says:
====================
ibmveth: fix hangs, use-after-frees and netpoll races
Nine fixes for serious bugs in the ibmveth driver: two hang the
system, four are use-after-frees, one corrupts memory, one lets a
frame from another partition stall or oops the receiver, and one makes
ethtool -L report success when it failed.
1. Netpoll races with RX replenish (memory corruption, NULL
dereference): remove ndo_poll_controller, as was done for
ibmvnic, skip RX replenish in netpoll's budget-0 poll, and
enable NAPI only once the RX resources exist.
Fixes: 6b4223748895, bea3348eef27
2. Hang after a failed internal reopen: the next close() waits in
napi_disable() forever with RTNL held, and only a reboot
recovers. Skip close() when open() did not succeed.
Fixes: 860f242eb534
3. Use-after-free in remove(): a reset queued from NAPI could run
on the freed adapter. Disable the reset work first.
Fixes: 2c91e2319ed9
4. Hang or NULL dereference on a bad RX correlator from PHYP: poll
spun on that slot until RCU stalled, and a correlator naming an
inactive pool dereferenced NULL. A frame that does not fit its
buffer was copied past the end. Move past the bad slot and stay
in poll, and drop a frame that does not fit.
Fixes: 2c91e2319ed9, 860f242eb534
5. Use-after-free after a failed probe: the pool kobjects stay in
sysfs after the adapter is freed. Put them, as remove() does,
and give them a release() that probe and remove() wait for, so
CONFIG_DEBUG_KOBJECT_RELEASE cannot free them early either.
Fixes: 860f242eb534
6. ethtool -L returns 0 when it cannot allocate the new TX queues.
Return the allocation error.
Fixes: 10c2aba89cc0
7. Use-after-free of TX buffers: close() frees them without
waiting for a running transmit. It is called directly for MTU,
offload and buffer pool changes, and through dev_close(), which
does not wait either with a noqueue qdisc. Use
netif_tx_disable().
Fixes: d6832ca48d8a
8. Use-after-free of the RX queue: napi_disable() returns before
the poll has finished, and the rest of the poll re-enables the
interrupt and reads the RX queue that close() then frees. Wait
with synchronize_net().
Fixes: bea3348eef27
9. Stall or oops from a frame sent by another partition: the RX
checksum helper passes the IPv4 ihl to ip_fast_csum(), which on
ppc64 reads up to 16 GiB for ihl 0, and both RX offload helpers
trust the IP and TCP header lengths. Check the headers before
use, with KUnit cases.
Fixes: 9c7e8bc584f5, 7b5967389f5a, 66aa0678efc2
Patches 1-8 were found in review of the ibmveth multi-queue RX
series [1] (the patch 4 frame bound by the Sashiko review of v2), and
patch 9 by the Sashiko review of v3 and the review that followed it.
Landing them first also shrinks that series, which then only extends
this handling per queue.
Testing: the new and extended KUnit cases in patches 4 and 9 fail or
oops on the unfixed driver and pass on qemu pseries (ppc64le). On a
POWER10 LPAR: the v3 suite (netconsole under printk and ping floods,
MTU and buffer pool changes under traffic, a forced open() failure
followed by down and up, unbind/bind under traffic, a forced
register_netdev() failure in probe, ethtool -L with a forced TX
buffer allocation failure, and rapid link down/up and MTU cycles under
a ping flood for patch 8) and patch 9 large-send regression on v5
(iperf3 over IPv4 and IPv6 at MTU 1500 and 9000, threaded NAPI and
busy polling; no new drops or InCsumErrors). The forced failures used
test-only module parameters that are not part of this series.
The triggers are rare and there are no field reports, so the series
targets net-next. It is based on net-next d8674294aefe ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net"), which
includes the two open() error-path fixes (af0524bf4ce1,
84bec0bf0352). Patch 2 explains how it relates to them. It also
applies cleanly to net. All carry Fixes: tags; I am happy to
repost against net, or add Cc: stable, if you prefer.
Changes in v5:
Patches 1-8: commit message wording only; the code is unchanged.
Patch 9 fixes a gso_segs undercount found by the Sashiko review of v4.
The large send helper accepted a frame longer than its IP length and
computed gso_segs from the IP length. Bytes past the IP length stay in
a bridged or switched frame, so the egress path produced more segments
than gso_segs claimed. The helper now refuses a frame whose IP length
is not the frame length.
Also in patch 9: new KUnit cases for that and for header-only frames,
so the TCP payload check is still covered. The message no longer says
a refused frame is checked by the stack, which a bridged or switched
frame is not.
====================
Link: https://patch.msgid.link/20261013182926.30417-1-mmc@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
