]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: The RX page_ring is optional
authorMartin Habets <habetsm.xilinx@gmail.com>
Sun, 2 Jan 2022 08:41:22 +0000 (08:41 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Jan 2022 02:14:21 +0000 (18:14 -0800)
commit48f6cc618887973cd68b2f10ca9b3f886c5245e1
tree6bb4163e23d6bc889744f3dbca70c8d86a421274
parent99a51c7a6fa7106e84ac49ff4f79df023b891436
sfc: The RX page_ring is optional

The RX page_ring is an optional feature that improves
performance. When allocation fails the driver can still
function, but possibly with a lower bandwidth.
Guard against dereferencing a NULL page_ring.

Fixes: 7d8bfb495d1c ("sfc: reuse pages to avoid DMA mapping/unmapping costs")
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Reported-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/164111288276.5798.10330502993729113868.stgit@palantir17.mph.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/falcon/rx.c
drivers/net/ethernet/sfc/rx_common.c