]> git.dujemihanovic.xyz Git - linux.git/commit
Revert "xsk: Support redirect to any socket bound to the same umem"
authorMagnus Karlsson <magnus.karlsson@intel.com>
Tue, 4 Jun 2024 12:29:25 +0000 (14:29 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 5 Jun 2024 07:42:30 +0000 (09:42 +0200)
commit7fcf26b315bbb728036da0862de6b335da83dff2
tree7d19b4d26135482b39c0febf4f7ef56fe0eec936
parentd0d1df8ba18abc57f28fb3bc053b2bf319367f2c
Revert "xsk: Support redirect to any socket bound to the same umem"

This reverts commit 2863d665ea41282379f108e4da6c8a2366ba66db.

This patch introduced a potential kernel crash when multiple napi instances
redirect to the same AF_XDP socket. By removing the queue_index check, it is
possible for multiple napi instances to access the Rx ring at the same time,
which will result in a corrupted ring state which can lead to a crash when
flushing the rings in __xsk_flush(). This can happen when the linked list of
sockets to flush gets corrupted by concurrent accesses. A quick and small fix
is not possible, so let us revert this for now.

Reported-by: Yuval El-Hanany <YuvalE@radware.com>
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/xdp-newbies/8100DBDC-0B7C-49DB-9995-6027F6E63147@radware.com
Link: https://lore.kernel.org/bpf/20240604122927.29080-2-magnus.karlsson@gmail.com
net/xdp/xsk.c