diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2022-08-12 13:32:59 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-08-15 17:26:07 +0200 |
commit | 58ca14ed98c87cfe0d1408cc65a9745d9e9b7a56 (patch) | |
tree | b5147c832716f50fccee90819d5cab9c3a983b7e /net/openvswitch/meter.c | |
parent | 27e23836ce22a3e5d89712ef832ab72e47ce9f43 (diff) | |
download | linux-58ca14ed98c87cfe0d1408cc65a9745d9e9b7a56.tar.bz2 |
xsk: Fix corrupted packets for XDP_SHARED_UMEM
Fix an issue in XDP_SHARED_UMEM mode together with aligned mode where
packets are corrupted for the second and any further sockets bound to
the same umem. In other words, this does not affect the first socket
bound to the umem. The culprit for this bug is that the initialization
of the DMA addresses for the pre-populated xsk buffer pool entries was
not performed for any socket but the first one bound to the umem. Only
the linear array of DMA addresses was populated. Fix this by populating
the DMA addresses in the xsk buffer pool for every socket bound to the
same umem.
Fixes: 94033cd8e73b8 ("xsk: Optimize for aligned case")
Reported-by: Alasdair McWilliam <alasdair.mcwilliam@outlook.com>
Reported-by: Intrusion Shield Team <dnevil@intrusion.com>
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Alasdair McWilliam <alasdair.mcwilliam@outlook.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/xdp-newbies/6205E10C-292E-4995-9D10-409649354226@outlook.com/
Link: https://lore.kernel.org/bpf/20220812113259.531-1-magnus.karlsson@gmail.com
Diffstat (limited to 'net/openvswitch/meter.c')
0 files changed, 0 insertions, 0 deletions