mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
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>
This commit is contained in:
parent
b793dc5c6e
commit
e6d473e635
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user