Skip to content

mlx5: ptp fifo bugfixes

Vadim Fedorenko netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 1 replyIn review
  2. v42 patches 7 repliesSuperseded
  3. v12 patches 13 repliesSuperseded

Changes in v5 from the cover letter

Change check to WARN_ON_ONCE() in mlx5e_skb_fifo_pop() Change the check of OOO cqe as Jakub provided corner case Move OOO logic into separate function and add counter

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mlx5: fix skb leak while fifo resync and pushdrivers/net/ethernet/mellanox/mlx5/core/en/ptp.c drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h+5 -30 replies
2/2mlx5: fix possible ptp queue fifo use-after-freedrivers/net/ethernet/mellanox/mlx5/core/en/ptp.c drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +1 more+22 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchGal PressmanTariq Toukan
1/2R-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH net v5 0/2] mlx5: ptp fifo bugfixes

Simple FIFO implementation for PTP queue has several bugs which lead to use-after-free and skb leaks. This series fixes the issues and adds new checks for this FIFO implementation to uncover the same problems in future.

v4 -> v5:
Change check to WARN_ON_ONCE() in mlx5e_skb_fifo_pop() Change the check of OOO cqe as Jakub provided corner case Move OOO logic into separate function and add counter
v3 -> v4:
Change pr_err to mlx5_core_err_rl per suggest
Removed WARN_ONCE on fifo push because has_room() should catch the issue
v2 -> v3:
Rearrange patches order and rephrase commit messages Remove counters as Gal confirmed FW bug, use KERN_ERR message instead Provide proper budget to napi_consume_skb as Jakub suggested
v1 -> v2:
Update Fixes tag to proper commit.
Change debug line to avoid double print of function name

Vadim Fedorenko (2):
mlx5: fix skb leak while fifo resync and push
mlx5: fix possible ptp queue fifo use-after-free

 .../net/ethernet/mellanox/mlx5/core/en/ptp.c  | 25 ++++++++++++++++---
 .../net/ethernet/mellanox/mlx5/core/en/txrx.h |  4 ++-
 .../ethernet/mellanox/mlx5/core/en_stats.c    |  1 +
 .../ethernet/mellanox/mlx5/core/en_stats.h    |  1 +
 4 files changed, 27 insertions(+), 4 deletions(-)
Signature · 1 line
2.30.2