diff options
| author | Maciej Fijalkowski <maciej.fijalkowski@intel.com> | 2026-11-02 13:49:45 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-09 15:34:30 -0800 |
| commit | 5a9b5e315e101dfa02af5d8d3b27d893ba3e5566 (patch) | |
| tree | c16db643cefe95d20a4bf16ae4c4ddc17fbccb66 /scripts | |
| parent | 8b7bd01b9c56c0d1f65d0e2ad304b775e0d709e3 (diff) | |
ice: xsk: do not free in-flight frags on XDP_TX completion
ice_xmit_xdp_tx_zc() takes the frags of a multi-buffer frame off
pool->xskb_list but leaves XDP_FLAGS_HAS_FRAGS set on the head. When
the head completes, xsk_buff_free() frees whatever is on the list at
that point, which are the frags of a frame still being received.
If ice_xmit_xdp_tx_zc() completes such a head while cleaning the ring
before sending another frame, xsk_buff_get_frag() returns NULL and
xsk_buff_xdp_get_dma() dereferences it.
Clear the flag on the head once its frags are on the ring. As
xdp_get_buff_len() then covers only the head, count Rx bytes before
running the XDP program, like libeth does.
Fixes: eeb2b5381038 ("ice: xsk: Tx multi-buffer support")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Björn Töpel <bjorn@kernel.org>
Link: https://patch.msgid.link/20261102124950.958345-5-maciej.fijalkowski@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
