]> git.baikalelectronics.ru Git - kernel.git/commit
mlx5: fix xdp data_meta setup in mlx5e_fill_xdp_buff
authorJesper Dangaard Brouer <brouer@redhat.com>
Wed, 27 May 2020 13:44:09 +0000 (15:44 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 30 May 2020 04:20:19 +0000 (21:20 -0700)
commit069847dd11ff2ba3e89713a6a6ab8b2e6d972b4a
tree1eb01f47a99a6fe30d7fabe4b3f903b05a212326
parenta22c6596cc689aa878b0080a264af56fc457996f
mlx5: fix xdp data_meta setup in mlx5e_fill_xdp_buff

The helper function xdp_set_data_meta_invalid() must be called after
setting xdp->data as it depends on it.

The bug was introduced in the cited patch below, and cause the kernel
to crash when using BPF helper bpf_xdp_adjust_head() on mlx5 driver.

Fixes: 0048f1b509a1 ("mlx5, xsk: Migrate to new MEM_TYPE_XSK_BUFF_POOL")
Reported-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c