mbox series

[net,v4,0/2] mlx5: ptp fifo bugfixes

Message ID 20230201122605.1350664-1-vadfed@meta.com (mailing list archive)
Headers show
Series mlx5: ptp fifo bugfixes | expand

Message

Vadim Fedorenko Feb. 1, 2023, 12:26 p.m. UTC
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.

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 |  6 +++--
 2 files changed, 23 insertions(+), 8 deletions(-)