]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Fri, 21 Jan 2022 14:49:24 +0000 (15:49 +0100)
commite68f278d532cf213ca795ae3e6eef6e0dea40c3a
tree02e5ef266e7d9baf8d3dfa3d3d1f5807292b2e55
parent226825f143d13fdb5c9d68a31bb3baf1a27b9c30
sfc: The RX page_ring is optional

BugLink: https://bugs.launchpad.net/bugs/1957882
commit 1d5a474240407c38ca8c7484a656ee39f585399c upstream.

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: 2768935a4660 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
drivers/net/ethernet/sfc/falcon/rx.c
drivers/net/ethernet/sfc/rx_common.c