summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2023-01-18 18:18:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-01 10:34:26 +0300
commit248f6a70eac16d0171d6b74648516d5153e85b13 (patch)
tree549b2ced911f5e2fc5bc33e5dbffbd5e1b281124 /drivers
parentc80475214850cf4fe7dfdbcf15adf31b812b08d7 (diff)
downloadlinux-248f6a70eac16d0171d6b74648516d5153e85b13.tar.xz
selftests/net: toeplitz: fix race on tpacket_v3 block close
[ Upstream commit 903848249a781d76d59561d51676c95b3a4d7162 ] Avoid race between process wakeup and tpacket_v3 block timeout. The test waits for cfg_timeout_msec for packets to arrive. Packets arrive in tpacket_v3 rings, which pass packets ("frames") to the process in batches ("blocks"). The sk waits for req3.tp_retire_blk_tov msec to release a block. Set the block timeout lower than the process waiting time, else the process may find that no block has been released by the time it scans the socket list. Convert to a ring of more than one, smaller, blocks with shorter timeouts. Blocks must be page aligned, so >= 64KB. Fixes: 5ebfb4cc3048 ("selftests/net: toeplitz test") Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20230118151847.4124260-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions