Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2019 11:08:21 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347322 - head/sys/dev/mlx5/mlx5_en
Message-ID:  <201905081108.x48B8Lst064066@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed May  8 11:08:21 2019
New Revision: 347322
URL: https://svnweb.freebsd.org/changeset/base/347322

Log:
  Ensure the flowtable rules are not freed twice in mlx5en(4).
  This can happen when re-loading the driver.
  
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c	Wed May  8 11:08:01 2019	(r347321)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c	Wed May  8 11:08:21 2019	(r347322)
@@ -131,6 +131,9 @@ mlx5e_del_eth_addr_from_flow_table(struct mlx5e_priv *
 
 	if (ai->tt_vec & (1 << MLX5E_TT_ANY))
 		mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_ANY]);
+
+	/* ensure the rules are not freed again */
+	ai->tt_vec = 0;
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905081108.x48B8Lst064066>