aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dsa
diff options
context:
space:
mode:
authorEgil Hjelmeland <privat@egil-hjelmeland.no>2017-12-07 19:56:04 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-08 14:12:33 -0500
commit2e8d243e887c8802b373338ddff684aa0578be3b (patch)
treea954e778e154c3c6fe325cc51c54e4c5c8cd96c0 /include/linux/dsa
parentnet: sched: fix use-after-free in tcf_block_put_ext (diff)
downloadlinux-dev-2e8d243e887c8802b373338ddff684aa0578be3b.tar.xz
linux-dev-2e8d243e887c8802b373338ddff684aa0578be3b.zip
net: dsa: lan9303: Protect ALR operations with mutex
ALR table operations are a sequence of related register operations which should be protected from concurrent access. The alr_cache should also be protected. Add alr_mutex doing that. Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa')
-rw-r--r--include/linux/dsa/lan9303.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
index f48a85c377de..b6514c29563f 100644
--- a/include/linux/dsa/lan9303.h
+++ b/include/linux/dsa/lan9303.h
@@ -26,6 +26,7 @@ struct lan9303 {
bool phy_addr_sel_strap;
struct dsa_switch *ds;
struct mutex indirect_mutex; /* protect indexed register access */
+ struct mutex alr_mutex; /* protect ALR access */
const struct lan9303_phy_ops *ops;
bool is_bridged; /* true if port 1 and 2 are bridged */