Re: [PATCH 1/1] xskmap: reject TX-only AF_XDP sockets

From: Jason Xing

Date: Wed Apr 15 2026 - 04:45:00 EST


On Mon, Mar 30, 2026 at 3:33 AM Linpu Yu <linpu5433@xxxxxxxxx> wrote:
>
> Reject TX-only AF_XDP sockets from XSKMAP updates. Redirected
> packets always enter the Rx path, where the kernel expects the
> selected socket to have an Rx ring. A TX-only socket can
> currently be inserted into an XSKMAP, and redirecting a packet
> to it crashes the kernel in xsk_generic_rcv().
>
> Keep TX-only AF_XDP sockets valid for pure Tx use, but prevent
> them from being published through XSKMAP.
>
> Fixes: fbfc504a24f5 ("bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP")
> Reported-by: Juefei Pu <tomapufckgml@xxxxxxxxx>
> Reported-by: Yuan Tan <yuantan098@xxxxxxxxx>
> Signed-off-by: Xin Liu <bird@xxxxxxxxxx>
> Signed-off-by: Yifan Wu <yifanwucs@xxxxxxxxx>
> Signed-off-by: Linpu Yu <linpu5433@xxxxxxxxx>

Hi Linpu,

Any plan to post a v2 with our questions resolved?

Thanks,
Jason