]> Gentwo Git Trees - linux/.git/commit
net: ps3_gelic_net: handle skb allocation failures
authorFlorian Fuchs <fuchsfl@gmail.com>
Thu, 13 Nov 2025 18:10:00 +0000 (19:10 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Nov 2025 11:31:09 +0000 (12:31 +0100)
commit0f08f0b0fb5e674b48f30e86c103760204a1d3f3
tree7b1b9cd37579426f59a8cfee76d5a9fd5764b81e
parent896f1a2493b59beb2b5ccdf990503dbb16cb2256
net: ps3_gelic_net: handle skb allocation failures

Handle skb allocation failures in RX path, to avoid NULL pointer
dereference and RX stalls under memory pressure. If the refill fails
with -ENOMEM, complete napi polling and wake up later to retry via timer.
Also explicitly re-enable RX DMA after oom, so the dmac doesn't remain
stopped in this situation.

Previously, memory pressure could lead to skb allocation failures and
subsequent Oops like:

Oops: Kernel access of bad area, sig: 11 [#2]
Hardware name: SonyPS3 Cell Broadband Engine 0x701000 PS3
NIP [c0003d0000065900] gelic_net_poll+0x6c/0x2d0 [ps3_gelic] (unreliable)
LR [c0003d00000659c4] gelic_net_poll+0x130/0x2d0 [ps3_gelic]
Call Trace:
  gelic_net_poll+0x130/0x2d0 [ps3_gelic] (unreliable)
  __napi_poll+0x44/0x168
  net_rx_action+0x178/0x290

Steps to reproduce the issue:
1. Start a continuous network traffic, like scp of a 20GB file
2. Inject failslab errors using the kernel fault injection:
    echo -1 > /sys/kernel/debug/failslab/times
    echo 30 > /sys/kernel/debug/failslab/interval
    echo 100 > /sys/kernel/debug/failslab/probability
3. After some time, traces start to appear, kernel Oopses
   and the system stops

Step 2 is not always necessary, as it is usually already triggered by
the transfer of a big enough file.

Fixes: 02c1889166b4 ("ps3: gigabit ethernet driver for PS3, take3")
Signed-off-by: Florian Fuchs <fuchsfl@gmail.com>
Link: https://patch.msgid.link/20251113181000.3914980-1-fuchsfl@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/toshiba/ps3_gelic_net.c
drivers/net/ethernet/toshiba/ps3_gelic_net.h