diff options
author | Kevin Groeneveld <kgroeneveld@lenbrook.com> | 2025-01-13 16:48:45 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-01-15 03:39:11 +0100 |
commit | 001ba0902046cb6c352494df610718c0763e77a5 (patch) | |
tree | b5800679a74c2dc17e9d81ce53044d3004302935 /drivers/net/vxlan/vxlan_mdb.c | |
parent | net: netpoll: ensure skb_pool list is always initialized (diff) | |
download | linux-001ba0902046cb6c352494df610718c0763e77a5.tar.xz linux-001ba0902046cb6c352494df610718c0763e77a5.zip |
net: fec: handle page_pool_dev_alloc_pages error
The fec_enet_update_cbd function calls page_pool_dev_alloc_pages but did
not handle the case when it returned NULL. There was a WARN_ON(!new_page)
but it would still proceed to use the NULL pointer and then crash.
This case does seem somewhat rare but when the system is under memory
pressure it can happen. One case where I can duplicate this with some
frequency is when writing over a smbd share to a SATA HDD attached to an
imx6q.
Setting /proc/sys/vm/min_free_kbytes to higher values also seems to solve
the problem for my test case. But it still seems wrong that the fec driver
ignores the memory allocation error and can crash.
This commit handles the allocation error by dropping the current packet.
Fixes: 95698ff6177b5 ("net: fec: using page pool to manage RX buffers")
Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20250113154846.1765414-1-kgroeneveld@lenbrook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/vxlan/vxlan_mdb.c')
0 files changed, 0 insertions, 0 deletions