diff options
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1683e5db2f27..c71c434a4c05 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/wireless.h> | 21 | #include <linux/wireless.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/export.h> | ||
23 | #include <net/wext.h> | 24 | #include <net/wext.h> |
24 | 25 | ||
25 | #include "net-sysfs.h" | 26 | #include "net-sysfs.h" |
@@ -147,7 +148,7 @@ static ssize_t show_speed(struct device *dev, | |||
147 | 148 | ||
148 | if (netif_running(netdev)) { | 149 | if (netif_running(netdev)) { |
149 | struct ethtool_cmd cmd; | 150 | struct ethtool_cmd cmd; |
150 | if (!dev_ethtool_get_settings(netdev, &cmd)) | 151 | if (!__ethtool_get_settings(netdev, &cmd)) |
151 | ret = sprintf(buf, fmt_udec, ethtool_cmd_speed(&cmd)); | 152 | ret = sprintf(buf, fmt_udec, ethtool_cmd_speed(&cmd)); |
152 | } | 153 | } |
153 | rtnl_unlock(); | 154 | rtnl_unlock(); |
@@ -165,7 +166,7 @@ static ssize_t show_duplex(struct device *dev, | |||
165 | 166 | ||
166 | if (netif_running(netdev)) { | 167 | if (netif_running(netdev)) { |
167 | struct ethtool_cmd cmd; | 168 | struct ethtool_cmd cmd; |
168 | if (!dev_ethtool_get_settings(netdev, &cmd)) | 169 | if (!__ethtool_get_settings(netdev, &cmd)) |
169 | ret = sprintf(buf, "%s\n", | 170 | ret = sprintf(buf, "%s\n", |
170 | cmd.duplex ? "full" : "half"); | 171 | cmd.duplex ? "full" : "half"); |
171 | } | 172 | } |
@@ -712,13 +713,13 @@ static void rx_queue_release(struct kobject *kobj) | |||
712 | struct rps_dev_flow_table *flow_table; | 713 | struct rps_dev_flow_table *flow_table; |
713 | 714 | ||
714 | 715 | ||
715 | map = rcu_dereference_raw(queue->rps_map); | 716 | map = rcu_dereference_protected(queue->rps_map, 1); |
716 | if (map) { | 717 | if (map) { |
717 | RCU_INIT_POINTER(queue->rps_map, NULL); | 718 | RCU_INIT_POINTER(queue->rps_map, NULL); |
718 | kfree_rcu(map, rcu); | 719 | kfree_rcu(map, rcu); |
719 | } | 720 | } |
720 | 721 | ||
721 | flow_table = rcu_dereference_raw(queue->rps_flow_table); | 722 | flow_table = rcu_dereference_protected(queue->rps_flow_table, 1); |
722 | if (flow_table) { | 723 | if (flow_table) { |
723 | RCU_INIT_POINTER(queue->rps_flow_table, NULL); | 724 | RCU_INIT_POINTER(queue->rps_flow_table, NULL); |
724 | call_rcu(&flow_table->rcu, rps_dev_flow_table_release); | 725 | call_rcu(&flow_table->rcu, rps_dev_flow_table_release); |
@@ -987,10 +988,10 @@ static ssize_t store_xps_map(struct netdev_queue *queue, | |||
987 | } | 988 | } |
988 | 989 | ||
989 | if (nonempty) | 990 | if (nonempty) |
990 | rcu_assign_pointer(dev->xps_maps, new_dev_maps); | 991 | RCU_INIT_POINTER(dev->xps_maps, new_dev_maps); |
991 | else { | 992 | else { |
992 | kfree(new_dev_maps); | 993 | kfree(new_dev_maps); |
993 | rcu_assign_pointer(dev->xps_maps, NULL); | 994 | RCU_INIT_POINTER(dev->xps_maps, NULL); |
994 | } | 995 | } |
995 | 996 | ||
996 | if (dev_maps) | 997 | if (dev_maps) |