Skip to content
Commit 3a50cf1e authored by Vadim Fedorenko's avatar Vadim Fedorenko Committed by Saeed Mahameed
Browse files

mlx5: fix possible ptp queue fifo use-after-free



Fifo indexes are not checked during pop operations and it leads to
potential use-after-free when poping from empty queue. Such case was
possible during re-sync action. WARN_ON_ONCE covers future cases.

There were out-of-order cqe spotted which lead to drain of the queue and
use-after-free because of lack of fifo pointers check. Special check and
counter are added to avoid resync operation if SKB could not exist in the
fifo because of OOO cqe (skb_id must be between consumer and producer
index).

Fixes: 58a51894 ("net/mlx5e: Add resiliency for PTP TX port timestamp")
Signed-off-by: default avatarVadim Fedorenko <vadfed@meta.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent e435941b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment