diff options
| author | Gal Pressman <gal@nvidia.com> | 2026-11-15 09:29:34 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-17 18:16:43 -0800 |
| commit | ff1ee9cc8993b1e5cf6459108dba1576fee221d0 (patch) | |
| tree | a5c8a9e2dde22716ceac31f9b8def4b861b981cc /tools/perf/scripts/python/bin | |
| parent | 0a3778b93be43f80ac529a1305a521ac55207a95 (diff) | |
net/mlx5e: Fix XSK pool corruption when switching channels
When the device supports tis_tir_td_order, mlx5e_safe_switch_params()
closes the old channels only after the new ones are activated. With an
AF_XDP socket bound, the old and the new channel hold an XSK RQ on the
same pool.
The old RQ returns its buffers to the pool while the new RQ is already
allocating from it. Since the pool is lockless and expects a single user
at a time, it gets out of sync.
Close the old XSK queues before activating the new channels, the rest of
the old channels can still be closed later.
The crash was hit by our regression tests, with a random sequence of
binding xdpsock to every queue and later changing the ring size.
This resolves the following call trace:
BUG: kernel NULL pointer dereference, address: 0000000000000068
RIP: 0010:mlx5e_free_rx_mpwqe+0x113/0x250 [mlx5_core]
Call Trace:
mlx5e_dealloc_rx_mpwqe+0x38/0xb0 [mlx5_core]
mlx5e_free_rx_descs+0x126/0x170 [mlx5_core]
mlx5e_close_rq+0x81/0xb0 [mlx5_core]
mlx5e_close_channels+0x4b/0xa0 [mlx5_core]
mlx5e_safe_switch_params+0x34d/0x3e0 [mlx5_core]
mlx5e_xdp_set+0x287/0x3a0 [mlx5_core]
dev_xdp_install+0x269/0x400
Fixes: 3b88a535a8e1 ("net/mlx5e: Defer channels closure to reduce interface down time")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20261115072934.353341-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
