[Intel-wired-lan] [PATCH bpf] xsk: Check if a queue exists during umem setup

Daniel Borkmann daniel at iogearbox.net
Tue Jan 15 20:03:49 UTC 2019


On 01/15/2019 10:19 AM, Kazimierczak, Krzysztof wrote:
> From 6cbcfa3d0909bc27af0be6122dc6bfbfa4c9269e Mon Sep 17 00:00:00 2001
> From: Krzysztof Kazimierczak <krzysztof.kazimierczak at intel.com>
> Date: Thu, 10 Jan 2019 20:29:02 +0100
> Subject: [PATCH bpf] xsk: Check if a queue exists during umem setup
> 
> In the xdp_umem_assign_dev() path, the xsk code does not
> check if a queue for which umem is to be created exists.
> It leads to a situation where umem is not assigned to any
> Tx/Rx queue of a netdevice, without notifying the stack
> about an error. This affects both XDP_SKB and XDP_DRV
> modes - in case of XDP_DRV_ZC, queue index is checked by
> the driver.
> 
> This patch fixes xsk code, so that in both XDP_SKB and
> XDP_DRV mode of AF_XDP, an error is returned when requested
> queue index exceedes an existing maximum.
> 
> Fixes: c9b47cc1fabca ("xsk: fix bug when trying to use both copy and zero-copy on one queue id")
> Reported-by: Jakub Spizewski <jakub.spizewski at intel.com>
> Signed-off-by: Krzysztof Kazimierczak <krzysztof.kazimierczak at intel.com>

Applied, thanks!


More information about the Intel-wired-lan mailing list