aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-08-18 13:46:21 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-18 22:37:21 -0700
commite6d473e63536ea1989dc63c066f0c0464a969324 (patch)
tree26922aa532e18f5cd82bda214e1ba61fc22c1eb8 /net
parentnet: constify netdev_class_file (diff)
downloadlinux-dev-e6d473e63536ea1989dc63c066f0c0464a969324.tar.xz
linux-dev-e6d473e63536ea1989dc63c066f0c0464a969324.zip
net: make net_class ro_after_init
The net_class in sysfs is only modified on init. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/net-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 40937ee63f14..99061b0a1ebd 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1511,7 +1511,7 @@ static const void *net_namespace(struct device *d)
return dev_net(dev);
}
-static struct class net_class = {
+static struct class net_class __ro_after_init = {
.name = "net",
.dev_release = netdev_release,
.dev_groups = net_class_groups,