diff options
author | Yuval Avnery <yuvalav@mellanox.com> | 2019-03-11 06:18:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:38:42 +0200 |
commit | c297e881457882b2121d2c539fd7e75a0977f8cd (patch) | |
tree | 4c172c8ef736ed8edcafb9294c4ce4b496c5e351 /include | |
parent | 9441317513b726864375b3d26c98d371417a13ec (diff) | |
download | linux-stable-c297e881457882b2121d2c539fd7e75a0977f8cd.tar.gz linux-stable-c297e881457882b2121d2c539fd7e75a0977f8cd.tar.bz2 linux-stable-c297e881457882b2121d2c539fd7e75a0977f8cd.zip |
net/mlx5e: Add a lock on tir list
[ Upstream commit 80a2a9026b24c6bd34b8d58256973e22270bedec ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx5/driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index bbcfe2e5fd91..e8b92dee5a72 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -776,6 +776,8 @@ struct mlx5_pagefault { }; struct mlx5_td { + /* protects tirs list changes while tirs refresh */ + struct mutex list_lock; struct list_head tirs_list; u32 tdn; }; |