diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 365f7f5077e4..e8a8dc19365b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2413,7 +2413,7 @@ EXPORT_SYMBOL(__skb_get_rxhash); | |||
2413 | #ifdef CONFIG_RPS | 2413 | #ifdef CONFIG_RPS |
2414 | 2414 | ||
2415 | /* One global table that all flow-based protocols share. */ | 2415 | /* One global table that all flow-based protocols share. */ |
2416 | struct rps_sock_flow_table *rps_sock_flow_table __read_mostly; | 2416 | struct rps_sock_flow_table __rcu *rps_sock_flow_table __read_mostly; |
2417 | EXPORT_SYMBOL(rps_sock_flow_table); | 2417 | EXPORT_SYMBOL(rps_sock_flow_table); |
2418 | 2418 | ||
2419 | /* | 2419 | /* |
@@ -2425,7 +2425,7 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
2425 | struct rps_dev_flow **rflowp) | 2425 | struct rps_dev_flow **rflowp) |
2426 | { | 2426 | { |
2427 | struct netdev_rx_queue *rxqueue; | 2427 | struct netdev_rx_queue *rxqueue; |
2428 | struct rps_map *map = NULL; | 2428 | struct rps_map *map; |
2429 | struct rps_dev_flow_table *flow_table; | 2429 | struct rps_dev_flow_table *flow_table; |
2430 | struct rps_sock_flow_table *sock_flow_table; | 2430 | struct rps_sock_flow_table *sock_flow_table; |
2431 | int cpu = -1; | 2431 | int cpu = -1; |
@@ -2444,15 +2444,15 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
2444 | } else | 2444 | } else |
2445 | rxqueue = dev->_rx; | 2445 | rxqueue = dev->_rx; |
2446 | 2446 | ||
2447 | if (rxqueue->rps_map) { | 2447 | map = rcu_dereference(rxqueue->rps_map); |
2448 | map = rcu_dereference(rxqueue->rps_map); | 2448 | if (map) { |
2449 | if (map && map->len == 1) { | 2449 | if (map->len == 1) { |
2450 | tcpu = map->cpus[0]; | 2450 | tcpu = map->cpus[0]; |
2451 | if (cpu_online(tcpu)) | 2451 | if (cpu_online(tcpu)) |
2452 | cpu = tcpu; | 2452 | cpu = tcpu; |
2453 | goto done; | 2453 | goto done; |
2454 | } | 2454 | } |
2455 | } else if (!rxqueue->rps_flow_table) { | 2455 | } else if (!rcu_dereference_raw(rxqueue->rps_flow_table)) { |
2456 | goto done; | 2456 | goto done; |
2457 | } | 2457 | } |
2458 | 2458 | ||