linux-stable/net/xdp
Yewon Choi 2c0cbb97b1 xsk: Skip polling event check for unbound socket
[ Upstream commit e4d008d49a ]

In xsk_poll(), checking available events and setting mask bits should
be executed only when a socket has been bound. Setting mask bits for
unbound socket is meaningless.

Currently, it checks events even when xsk_check_common() failed.
To prevent this, we move goto location (skip_tx) after that checking.

Fixes: 1596dae2f1 ("xsk: check IFF_UP earlier in Tx path")
Signed-off-by: Yewon Choi <woni9911@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20231201061048.GA1510@libra05
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:39:08 +01:00
..
Kconfig
Makefile
xdp_umem.c xsk: Add missing overflow check in xdp_umem_reg 2023-03-30 12:49:02 +02:00
xdp_umem.h xsk: Fix umem cleanup bug at socket destruct 2020-11-20 15:52:39 +01:00
xsk.c xsk: Skip polling event check for unbound socket 2023-12-13 18:39:08 +01:00
xsk.h xdp: Add proper __rcu annotations to redirect map entries 2021-06-24 19:41:15 +02:00
xsk_buff_pool.c xsk: Inherit need_wakeup flag for shared sockets 2022-09-22 17:16:22 +02:00
xsk_diag.c xsk: Fix xsk_diag use-after-free error during socket cleanup 2023-09-19 12:28:01 +02:00
xsk_queue.c xsk: Remove MEM_TYPE_ZERO_COPY and corresponding code 2020-05-21 17:31:27 -07:00
xsk_queue.h xsk: Fix unaligned descriptor validation 2023-05-11 23:03:21 +09:00
xskmap.c bpf: Compute map_btf_id during build time 2022-04-26 11:35:21 -07:00