]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: Clear page contiguity bit when unmapping pool
authorIvan Malov <ivan.malov@oktetlabs.ru>
Tue, 28 Jun 2022 09:18:48 +0000 (12:18 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 28 Jun 2022 20:49:04 +0000 (22:49 +0200)
commit4acdcb7fe3d08739b7e46279e17669b69a890b4b
tree1620d5c2ea2fa738a2e8ad3041e234e54e05469f
parent211a94b6ccf64c7070a1bcca9043396fdcb556fd
xsk: Clear page contiguity bit when unmapping pool

When a XSK pool gets mapped, xp_check_dma_contiguity() adds bit 0x1
to pages' DMA addresses that go in ascending order and at 4K stride.

The problem is that the bit does not get cleared before doing unmap.
As a result, a lot of warnings from iommu_dma_unmap_page() are seen
in dmesg, which indicates that lookups by iommu_iova_to_phys() fail.

Fixes: d9ed155ea143 ("xsk: Introduce AF_XDP buffer allocation API")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20220628091848.534803-1-ivan.malov@oktetlabs.ru
net/xdp/xsk_buff_pool.c