diff options
| author | Anthony Pighin <anthony.pighin@nokia.com> | 2026-11-12 09:31:40 -0500 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-17 17:29:26 -0800 |
| commit | c35761f43c582460b45429f51be5c2a0f07ed9af (patch) | |
| tree | fcf18931f83ed1634803179a751b895891376e61 /tools/perf/scripts/python | |
| parent | 686b5f47f8cc6ec8ad092dd10d944a75d731ea5b (diff) | |
net: gianfar: clear the pending Rx skb when freeing the Rx ring
gfar_clean_rx_ring() keeps a frame that spans several Rx buffers in
rx_queue->skb between NAPI polls. When the interface is stopped (close,
MTU change, reset), free_skb_rx_queue() frees that skb but leaves the
pointer set, and nothing clears it when the rings are set up again.
After the restart, gfar_clean_rx_ring() picks up the stale pointer. The
first buffer it sees has RXBD_FIRST set, so the overrun handling frees
the skb a second time. By then the skb has usually been reallocated, so
the second free releases another owner's skb and data while they are
still in use.
Clear rx_queue->skb after freeing it.
Hit during development, as intermittent kernel panics in our automated
regression on an NXP LS1021A board (eTSEC), in an L2 Ethernet traffic
test that shuts and re-enables ports. It was seen on 6.6, 6.12 and
6.18 based kernels, crashing in unrelated places such as
kmem_cache_alloc() called from build_skb() in gfar_poll_rx_sq().
With the fix, the same test ran 90 bounces with no warnings or crashes.
Fixes: 75354148ce69 ("gianfar: Add paged allocation and Rx S/G")
Cc: stable@vger.kernel.org
Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261112143140.1395197-1-anthony.pighin@nokia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
