aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYuval Avnery <yuvalav@mellanox.com>2019-03-11 06:18:24 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-03-29 12:24:41 -0700
commit80a2a9026b24c6bd34b8d58256973e22270bedec (patch)
tree33b811dfa8458cbb24019c60cd9df3805e29fa1c /include
parentnet: mlx5: Add a missing check on idr_find, free buf (diff)
downloadlinux-dev-80a2a9026b24c6bd34b8d58256973e22270bedec.tar.xz
linux-dev-80a2a9026b24c6bd34b8d58256973e22270bedec.zip
net/mlx5e: Add a lock on tir list
Refresh tirs is looping over a global list of tirs while netdevs are adding and removing tirs from that list. That is why a lock is required. Fixes: 724b2aa15126 ("net/mlx5e: TIRs management refactoring") Signed-off-by: Yuval Avnery <yuvalav@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 022541dc5dbf..0d0729648844 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -594,6 +594,8 @@ enum mlx5_pagefault_type_flags {
};
struct mlx5_td {
+ /* protects tirs list changes while tirs refresh */
+ struct mutex list_lock;
struct list_head tirs_list;
u32 tdn;
};