linux-stable/net/xdp
Magnus Karlsson 9aea648830 xsk: add missing smp_rmb() in xsk_mmap
[ Upstream commit e6762c8bcf ]

All the setup code in AF_XDP is protected by a mutex with the
exception of the mmap code that cannot use it. To make sure that a
process banging on the mmap call at the same time as another process
is setting up the socket, smp_wmb() calls were added in the umem
registration code and the queue creation code, so that the published
structures that xsk_mmap needs would be consistent. However, the
corresponding smp_rmb() calls were not added to the xsk_mmap
code. This patch adds these calls.

Fixes: 37b076933a ("xsk: add missing write- and data-dependency barrier")
Fixes: c0c77d8fb7 ("xsk: add user memory registration support sockopt")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:21 +01:00
..
Kconfig
Makefile
xdp_umem.c xsk: proper AF_XDP socket teardown ordering 2019-11-24 08:20:32 +01:00
xdp_umem.h
xdp_umem_props.h
xsk.c xsk: add missing smp_rmb() in xsk_mmap 2020-01-27 14:50:21 +01:00
xsk_queue.c
xsk_queue.h xsk: Properly terminate assignment in xskq_produce_flush_desc 2019-07-26 09:14:12 +02:00