summaryrefslogtreecommitdiff
path: root/include/linux/mlx5
diff options
context:
space:
mode:
authorYuval Avnery <yuvalav@mellanox.com>2019-03-11 07:18:24 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2019-03-29 22:24:41 +0300
commit80a2a9026b24c6bd34b8d58256973e22270bedec (patch)
tree33b811dfa8458cbb24019c60cd9df3805e29fa1c /include/linux/mlx5
parent8e949363f017e2011464812a714fb29710fb95b4 (diff)
downloadlinux-80a2a9026b24c6bd34b8d58256973e22270bedec.tar.xz
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/linux/mlx5')
-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;
};