]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix dangling page pointer on DMA mapping error
authorEran Ben Elisha <eranbe@mellanox.com>
Wed, 16 Aug 2017 11:37:11 +0000 (14:37 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 30 Aug 2017 18:20:43 +0000 (21:20 +0300)
commit5c400662ccb37f0f8ff33860d7d25dc885494fcf
tree0ccd97c3e7a4a131f2214ff2a135975e3a096a71
parent33d2ca17dcc710eaf8a2c06fa53f68f6b59882d2
net/mlx5e: Fix dangling page pointer on DMA mapping error

Function mlx5e_dealloc_rx_wqe is using page pointer value as an
indication to valid DMA mapping. In case that the mapping failed, we
released the page but kept the dangling pointer. Store the page pointer
only after the DMA mapping passed to avoid invalid page DMA unmap.

Fixes: 3019ec658783 ("net/mlx5e: Add fragmented memory support for RX multi packet WQE")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c