net/mlx5e: Use RCU to protect rq->xdp_prog
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / en / xdp.c
index 0e6946fc121f0793234b057896de37b988429ac8..b28df21981a1349d727d1a4cca5a7373cb1a4992 100644 (file)
@@ -122,7 +122,7 @@ mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
 bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
                      u32 *len, struct xdp_buff *xdp)
 {
-       struct bpf_prog *prog = READ_ONCE(rq->xdp_prog);
+       struct bpf_prog *prog = rcu_dereference(rq->xdp_prog);
        u32 act;
        int err;