]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Do not free an empty page_ring
authorMartin Habets <habetsm.xilinx@gmail.com>
Mon, 4 Apr 2022 10:48:51 +0000 (11:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Apr 2022 11:53:52 +0000 (12:53 +0100)
commit00b4e64e104072ffa0ebd787ca1fb221213cb1e8
treeb39ba87efdb8e6a849d3ed1cdf61263120beefd2
parent3a4c7346477fc9efd7c0dfecc89eb25e51cc5820
sfc: Do not free an empty page_ring

When the page_ring is not used page_ptr_mask is 0.
Do not dereference page_ring[0] in this case.

Fixes: 7d8bfb495d1c ("sfc: reuse pages to avoid DMA mapping/unmapping costs")
Reported-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/rx_common.c