projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b793dc5
)
net: make net_class ro_after_init
author
stephen hemminger
<stephen@networkplumber.org>
Fri, 18 Aug 2017 20:46:21 +0000
(13:46 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sat, 19 Aug 2017 05:37:21 +0000
(22:37 -0700)
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>
net/core/net-sysfs.c
patch
|
blob
|
history
diff --git
a/net/core/net-sysfs.c
b/net/core/net-sysfs.c
index
40937ee
..
99061b0
100644
(file)
--- 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,