From: stephen hemminger Date: Fri, 18 Aug 2017 20:46:21 +0000 (-0700) Subject: net: make net_class ro_after_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6d473e63536ea1989dc63c066f0c0464a969324;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: make net_class ro_after_init The net_class in sysfs is only modified on init. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- 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,