Explorar el Código

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>
stephen hemminger hace 8 años
padre
commit
e6d473e635
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      net/core/net-sysfs.c

+ 1 - 1
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,