Message ID | 20201105202129.23644-8-saeedm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1a50cf9a67ff2241c2949d30bc11c8dd4280eef8 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2,1/7] net/mlx5e: Fix modify header actions memory leak | expand |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 599f5b5ebc97..6628a0197b4e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1584,7 +1584,7 @@ int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget) } while ((++work_done < budget) && (cqe = mlx5_cqwq_get_cqe(cqwq))); out: - if (rq->xdp_prog) + if (rcu_access_pointer(rq->xdp_prog)) mlx5e_xdp_rx_poll_complete(rq); mlx5_cqwq_update_db_record(cqwq);