diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-17 22:00:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-17 22:00:43 -0500 |
commit | 67f4efdce7d85282fbd5832cddc80a07eb89b6d6 (patch) | |
tree | 9a1771ef13b27abdf8cf172e5b7556ab93e5c48c /net | |
parent | c53aa5058ad5ca8876a47d6639ad4d4f2c5ed584 (diff) | |
parent | f4a75d2eb7b1e2206094b901be09adb31ba63681 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor line offset auto-merges.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/soft-interface.c | 12 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 15 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 4 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 12 | ||||
-rw-r--r-- | net/bluetooth/smp.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 4 | ||||
-rw-r--r-- | net/core/dev_addr_lists.c | 3 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 35 | ||||
-rw-r--r-- | net/ipv4/ip_vti.c | 5 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 15 | ||||
-rw-r--r-- | net/ipv4/tcp_metrics.c | 12 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 4 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 1 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 6 | ||||
-rw-r--r-- | net/mac80211/scan.c | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.c | 11 | ||||
-rw-r--r-- | net/mac80211/status.c | 9 | ||||
-rw-r--r-- | net/mac80211/tx.c | 9 | ||||
-rw-r--r-- | net/mac80211/util.c | 2 | ||||
-rw-r--r-- | net/sctp/proc.c | 8 | ||||
-rw-r--r-- | net/sunrpc/backchannel_rqst.c | 2 | ||||
-rw-r--r-- | net/wireless/reg.c | 5 |
25 files changed, 130 insertions, 57 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 2d1f89517d99..54800c783f96 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -347,6 +347,12 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
347 | 347 | ||
348 | soft_iface->last_rx = jiffies; | 348 | soft_iface->last_rx = jiffies; |
349 | 349 | ||
350 | /* Let the bridge loop avoidance check the packet. If will | ||
351 | * not handle it, we can safely push it up. | ||
352 | */ | ||
353 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
354 | goto out; | ||
355 | |||
350 | if (orig_node) | 356 | if (orig_node) |
351 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, | 357 | batadv_tt_add_temporary_global_entry(bat_priv, orig_node, |
352 | ethhdr->h_source); | 358 | ethhdr->h_source); |
@@ -354,12 +360,6 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
354 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) | 360 | if (batadv_is_ap_isolated(bat_priv, ethhdr->h_source, ethhdr->h_dest)) |
355 | goto dropped; | 361 | goto dropped; |
356 | 362 | ||
357 | /* Let the bridge loop avoidance check the packet. If will | ||
358 | * not handle it, we can safely push it up. | ||
359 | */ | ||
360 | if (batadv_bla_rx(bat_priv, skb, vid, is_bcast)) | ||
361 | goto out; | ||
362 | |||
363 | netif_rx(skb); | 363 | netif_rx(skb); |
364 | goto out; | 364 | goto out; |
365 | 365 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 9f5705fcf426..582f13405df9 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -861,6 +861,12 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, | |||
861 | */ | 861 | */ |
862 | common->flags &= ~BATADV_TT_CLIENT_TEMP; | 862 | common->flags &= ~BATADV_TT_CLIENT_TEMP; |
863 | 863 | ||
864 | /* the change can carry possible "attribute" flags like the | ||
865 | * TT_CLIENT_WIFI, therefore they have to be copied in the | ||
866 | * client entry | ||
867 | */ | ||
868 | tt_global_entry->common.flags |= flags; | ||
869 | |||
864 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only | 870 | /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only |
865 | * one originator left in the list and we previously received a | 871 | * one originator left in the list and we previously received a |
866 | * delete + roaming change for this originator. | 872 | * delete + roaming change for this originator. |
@@ -1574,7 +1580,7 @@ batadv_tt_response_fill_table(uint16_t tt_len, uint8_t ttvn, | |||
1574 | 1580 | ||
1575 | memcpy(tt_change->addr, tt_common_entry->addr, | 1581 | memcpy(tt_change->addr, tt_common_entry->addr, |
1576 | ETH_ALEN); | 1582 | ETH_ALEN); |
1577 | tt_change->flags = BATADV_NO_FLAGS; | 1583 | tt_change->flags = tt_common_entry->flags; |
1578 | 1584 | ||
1579 | tt_count++; | 1585 | tt_count++; |
1580 | tt_change++; | 1586 | tt_change++; |
@@ -2545,6 +2551,13 @@ bool batadv_tt_add_temporary_global_entry(struct batadv_priv *bat_priv, | |||
2545 | { | 2551 | { |
2546 | bool ret = false; | 2552 | bool ret = false; |
2547 | 2553 | ||
2554 | /* if the originator is a backbone node (meaning it belongs to the same | ||
2555 | * LAN of this node) the temporary client must not be added because to | ||
2556 | * reach such destination the node must use the LAN instead of the mesh | ||
2557 | */ | ||
2558 | if (batadv_bla_is_backbone_gw_orig(bat_priv, orig_node->orig)) | ||
2559 | goto out; | ||
2560 | |||
2548 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, | 2561 | if (!batadv_tt_global_add(bat_priv, orig_node, addr, |
2549 | BATADV_TT_CLIENT_TEMP, | 2562 | BATADV_TT_CLIENT_TEMP, |
2550 | atomic_read(&orig_node->last_ttvn))) | 2563 | atomic_read(&orig_node->last_ttvn))) |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 5a3f941b610f..f01e5e135b99 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1754,11 +1754,11 @@ int hci_register_dev(struct hci_dev *hdev) | |||
1754 | if (hdev->dev_type != HCI_AMP) | 1754 | if (hdev->dev_type != HCI_AMP) |
1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); | 1755 | set_bit(HCI_AUTO_OFF, &hdev->dev_flags); |
1756 | 1756 | ||
1757 | schedule_work(&hdev->power_on); | ||
1758 | |||
1759 | hci_notify(hdev, HCI_DEV_REG); | 1757 | hci_notify(hdev, HCI_DEV_REG); |
1760 | hci_dev_hold(hdev); | 1758 | hci_dev_hold(hdev); |
1761 | 1759 | ||
1760 | schedule_work(&hdev->power_on); | ||
1761 | |||
1762 | return id; | 1762 | return id; |
1763 | 1763 | ||
1764 | err_wqueue: | 1764 | err_wqueue: |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 399e5024b5bd..158a87bb0c0d 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -326,7 +326,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
326 | struct hci_dev *d; | 326 | struct hci_dev *d; |
327 | size_t rp_len; | 327 | size_t rp_len; |
328 | u16 count; | 328 | u16 count; |
329 | int i, err; | 329 | int err; |
330 | 330 | ||
331 | BT_DBG("sock %p", sk); | 331 | BT_DBG("sock %p", sk); |
332 | 332 | ||
@@ -347,9 +347,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
347 | return -ENOMEM; | 347 | return -ENOMEM; |
348 | } | 348 | } |
349 | 349 | ||
350 | rp->num_controllers = cpu_to_le16(count); | 350 | count = 0; |
351 | |||
352 | i = 0; | ||
353 | list_for_each_entry(d, &hci_dev_list, list) { | 351 | list_for_each_entry(d, &hci_dev_list, list) { |
354 | if (test_bit(HCI_SETUP, &d->dev_flags)) | 352 | if (test_bit(HCI_SETUP, &d->dev_flags)) |
355 | continue; | 353 | continue; |
@@ -357,10 +355,13 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data, | |||
357 | if (!mgmt_valid_hdev(d)) | 355 | if (!mgmt_valid_hdev(d)) |
358 | continue; | 356 | continue; |
359 | 357 | ||
360 | rp->index[i++] = cpu_to_le16(d->id); | 358 | rp->index[count++] = cpu_to_le16(d->id); |
361 | BT_DBG("Added hci%u", d->id); | 359 | BT_DBG("Added hci%u", d->id); |
362 | } | 360 | } |
363 | 361 | ||
362 | rp->num_controllers = cpu_to_le16(count); | ||
363 | rp_len = sizeof(*rp) + (2 * count); | ||
364 | |||
364 | read_unlock(&hci_dev_list_lock); | 365 | read_unlock(&hci_dev_list_lock); |
365 | 366 | ||
366 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, | 367 | err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, |
@@ -1366,6 +1367,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1366 | continue; | 1367 | continue; |
1367 | 1368 | ||
1368 | list_del(&match->list); | 1369 | list_del(&match->list); |
1370 | kfree(match); | ||
1369 | found++; | 1371 | found++; |
1370 | } | 1372 | } |
1371 | 1373 | ||
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 9176bc17595c..68a9587c9694 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -267,7 +267,7 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send) | |||
267 | 267 | ||
268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); | 268 | clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); |
269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, | 269 | mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, |
270 | hcon->dst_type, reason); | 270 | hcon->dst_type, HCI_ERROR_AUTH_FAILURE); |
271 | 271 | ||
272 | cancel_delayed_work_sync(&conn->security_timer); | 272 | cancel_delayed_work_sync(&conn->security_timer); |
273 | 273 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index 2705a2ab89af..974199daa911 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2895,8 +2895,10 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb, | |||
2895 | if (unlikely(tcpu != next_cpu) && | 2895 | if (unlikely(tcpu != next_cpu) && |
2896 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || | 2896 | (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || |
2897 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - | 2897 | ((int)(per_cpu(softnet_data, tcpu).input_queue_head - |
2898 | rflow->last_qtail)) >= 0)) | 2898 | rflow->last_qtail)) >= 0)) { |
2899 | tcpu = next_cpu; | ||
2899 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); | 2900 | rflow = set_rps_cpu(dev, skb, rflow, next_cpu); |
2901 | } | ||
2900 | 2902 | ||
2901 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { | 2903 | if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { |
2902 | *rflowp = rflow; | 2904 | *rflowp = rflow; |
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 87cc17db2d56..b079c7bbc157 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c | |||
@@ -319,7 +319,8 @@ int dev_addr_del(struct net_device *dev, const unsigned char *addr, | |||
319 | */ | 319 | */ |
320 | ha = list_first_entry(&dev->dev_addrs.list, | 320 | ha = list_first_entry(&dev->dev_addrs.list, |
321 | struct netdev_hw_addr, list); | 321 | struct netdev_hw_addr, list); |
322 | if (ha->addr == dev->dev_addr && ha->refcount == 1) | 322 | if (!memcmp(ha->addr, addr, dev->addr_len) && |
323 | ha->type == addr_type && ha->refcount == 1) | ||
323 | return -ENOENT; | 324 | return -ENOENT; |
324 | 325 | ||
325 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, | 326 | err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 5eea4a811042..14bbfcf717ac 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -457,19 +457,28 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
457 | struct inet_sock *inet = inet_sk(sk); | 457 | struct inet_sock *inet = inet_sk(sk); |
458 | int val = 0, err; | 458 | int val = 0, err; |
459 | 459 | ||
460 | if (((1<<optname) & ((1<<IP_PKTINFO) | (1<<IP_RECVTTL) | | 460 | switch (optname) { |
461 | (1<<IP_RECVOPTS) | (1<<IP_RECVTOS) | | 461 | case IP_PKTINFO: |
462 | (1<<IP_RETOPTS) | (1<<IP_TOS) | | 462 | case IP_RECVTTL: |
463 | (1<<IP_TTL) | (1<<IP_HDRINCL) | | 463 | case IP_RECVOPTS: |
464 | (1<<IP_MTU_DISCOVER) | (1<<IP_RECVERR) | | 464 | case IP_RECVTOS: |
465 | (1<<IP_ROUTER_ALERT) | (1<<IP_FREEBIND) | | 465 | case IP_RETOPTS: |
466 | (1<<IP_PASSSEC) | (1<<IP_TRANSPARENT) | | 466 | case IP_TOS: |
467 | (1<<IP_MINTTL) | (1<<IP_NODEFRAG))) || | 467 | case IP_TTL: |
468 | optname == IP_UNICAST_IF || | 468 | case IP_HDRINCL: |
469 | optname == IP_MULTICAST_TTL || | 469 | case IP_MTU_DISCOVER: |
470 | optname == IP_MULTICAST_ALL || | 470 | case IP_RECVERR: |
471 | optname == IP_MULTICAST_LOOP || | 471 | case IP_ROUTER_ALERT: |
472 | optname == IP_RECVORIGDSTADDR) { | 472 | case IP_FREEBIND: |
473 | case IP_PASSSEC: | ||
474 | case IP_TRANSPARENT: | ||
475 | case IP_MINTTL: | ||
476 | case IP_NODEFRAG: | ||
477 | case IP_UNICAST_IF: | ||
478 | case IP_MULTICAST_TTL: | ||
479 | case IP_MULTICAST_ALL: | ||
480 | case IP_MULTICAST_LOOP: | ||
481 | case IP_RECVORIGDSTADDR: | ||
473 | if (optlen >= sizeof(int)) { | 482 | if (optlen >= sizeof(int)) { |
474 | if (get_user(val, (int __user *) optval)) | 483 | if (get_user(val, (int __user *) optval)) |
475 | return -EFAULT; | 484 | return -EFAULT; |
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index 516188b0dc1e..f4a825d3bd7f 100644 --- a/net/ipv4/ip_vti.c +++ b/net/ipv4/ip_vti.c | |||
@@ -324,12 +324,17 @@ static int vti_rcv(struct sk_buff *skb) | |||
324 | if (tunnel != NULL) { | 324 | if (tunnel != NULL) { |
325 | struct pcpu_tstats *tstats; | 325 | struct pcpu_tstats *tstats; |
326 | 326 | ||
327 | if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) | ||
328 | return -1; | ||
329 | |||
327 | tstats = this_cpu_ptr(tunnel->dev->tstats); | 330 | tstats = this_cpu_ptr(tunnel->dev->tstats); |
328 | u64_stats_update_begin(&tstats->syncp); | 331 | u64_stats_update_begin(&tstats->syncp); |
329 | tstats->rx_packets++; | 332 | tstats->rx_packets++; |
330 | tstats->rx_bytes += skb->len; | 333 | tstats->rx_bytes += skb->len; |
331 | u64_stats_update_end(&tstats->syncp); | 334 | u64_stats_update_end(&tstats->syncp); |
332 | 335 | ||
336 | skb->mark = 0; | ||
337 | secpath_reset(skb); | ||
333 | skb->dev = tunnel->dev; | 338 | skb->dev = tunnel->dev; |
334 | return 1; | 339 | return 1; |
335 | } | 340 | } |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 733f48593ec3..4aefa0b42c2e 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1213,7 +1213,7 @@ new_segment: | |||
1213 | wait_for_sndbuf: | 1213 | wait_for_sndbuf: |
1214 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); | 1214 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); |
1215 | wait_for_memory: | 1215 | wait_for_memory: |
1216 | if (copied && likely(!tp->repair)) | 1216 | if (copied) |
1217 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); | 1217 | tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); |
1218 | 1218 | ||
1219 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) | 1219 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) |
@@ -1224,7 +1224,7 @@ wait_for_memory: | |||
1224 | } | 1224 | } |
1225 | 1225 | ||
1226 | out: | 1226 | out: |
1227 | if (copied && likely(!tp->repair)) | 1227 | if (copied) |
1228 | tcp_push(sk, flags, mss_now, tp->nonagle); | 1228 | tcp_push(sk, flags, mss_now, tp->nonagle); |
1229 | release_sock(sk); | 1229 | release_sock(sk); |
1230 | return copied + copied_syn; | 1230 | return copied + copied_syn; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7839d51fb65b..fc67831656e5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5320,11 +5320,6 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, | |||
5320 | goto discard; | 5320 | goto discard; |
5321 | } | 5321 | } |
5322 | 5322 | ||
5323 | /* ts_recent update must be made after we are sure that the packet | ||
5324 | * is in window. | ||
5325 | */ | ||
5326 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5327 | |||
5328 | /* step 3: check security and precedence [ignored] */ | 5323 | /* step 3: check security and precedence [ignored] */ |
5329 | 5324 | ||
5330 | /* step 4: Check for a SYN | 5325 | /* step 4: Check for a SYN |
@@ -5559,6 +5554,11 @@ step5: | |||
5559 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) | 5554 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) |
5560 | goto discard; | 5555 | goto discard; |
5561 | 5556 | ||
5557 | /* ts_recent update must be made after we are sure that the packet | ||
5558 | * is in window. | ||
5559 | */ | ||
5560 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5561 | |||
5562 | tcp_rcv_rtt_measure_ts(sk, skb); | 5562 | tcp_rcv_rtt_measure_ts(sk, skb); |
5563 | 5563 | ||
5564 | /* Process urgent data. */ | 5564 | /* Process urgent data. */ |
@@ -6137,6 +6137,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
6137 | } else | 6137 | } else |
6138 | goto discard; | 6138 | goto discard; |
6139 | 6139 | ||
6140 | /* ts_recent update must be made after we are sure that the packet | ||
6141 | * is in window. | ||
6142 | */ | ||
6143 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
6144 | |||
6140 | /* step 6: check the URG bit */ | 6145 | /* step 6: check the URG bit */ |
6141 | tcp_urg(sk, skb, th); | 6146 | tcp_urg(sk, skb, th); |
6142 | 6147 | ||
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 53bc5847bfa8..f696d7c2e9fa 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <linux/rcupdate.h> | 1 | #include <linux/rcupdate.h> |
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/jiffies.h> | 3 | #include <linux/jiffies.h> |
4 | #include <linux/bootmem.h> | ||
5 | #include <linux/module.h> | 4 | #include <linux/module.h> |
6 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
7 | #include <linux/slab.h> | 6 | #include <linux/slab.h> |
@@ -9,6 +8,7 @@ | |||
9 | #include <linux/tcp.h> | 8 | #include <linux/tcp.h> |
10 | #include <linux/hash.h> | 9 | #include <linux/hash.h> |
11 | #include <linux/tcp_metrics.h> | 10 | #include <linux/tcp_metrics.h> |
11 | #include <linux/vmalloc.h> | ||
12 | 12 | ||
13 | #include <net/inet_connection_sock.h> | 13 | #include <net/inet_connection_sock.h> |
14 | #include <net/net_namespace.h> | 14 | #include <net/net_namespace.h> |
@@ -1034,7 +1034,10 @@ static int __net_init tcp_net_metrics_init(struct net *net) | |||
1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); | 1034 | net->ipv4.tcp_metrics_hash_log = order_base_2(slots); |
1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; | 1035 | size = sizeof(struct tcpm_hash_bucket) << net->ipv4.tcp_metrics_hash_log; |
1036 | 1036 | ||
1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL); | 1037 | net->ipv4.tcp_metrics_hash = kzalloc(size, GFP_KERNEL | __GFP_NOWARN); |
1038 | if (!net->ipv4.tcp_metrics_hash) | ||
1039 | net->ipv4.tcp_metrics_hash = vzalloc(size); | ||
1040 | |||
1038 | if (!net->ipv4.tcp_metrics_hash) | 1041 | if (!net->ipv4.tcp_metrics_hash) |
1039 | return -ENOMEM; | 1042 | return -ENOMEM; |
1040 | 1043 | ||
@@ -1055,7 +1058,10 @@ static void __net_exit tcp_net_metrics_exit(struct net *net) | |||
1055 | tm = next; | 1058 | tm = next; |
1056 | } | 1059 | } |
1057 | } | 1060 | } |
1058 | kfree(net->ipv4.tcp_metrics_hash); | 1061 | if (is_vmalloc_addr(net->ipv4.tcp_metrics_hash)) |
1062 | vfree(net->ipv4.tcp_metrics_hash); | ||
1063 | else | ||
1064 | kfree(net->ipv4.tcp_metrics_hash); | ||
1059 | } | 1065 | } |
1060 | 1066 | ||
1061 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { | 1067 | static __net_initdata struct pernet_operations tcp_net_metrics_ops = { |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index cfe6ffe1c177..2798706cb063 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1986,6 +1986,9 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); | 1986 | tso_segs = tcp_init_tso_segs(sk, skb, mss_now); |
1987 | BUG_ON(!tso_segs); | 1987 | BUG_ON(!tso_segs); |
1988 | 1988 | ||
1989 | if (unlikely(tp->repair) && tp->repair_queue == TCP_SEND_QUEUE) | ||
1990 | goto repair; /* Skip network transmission */ | ||
1991 | |||
1989 | cwnd_quota = tcp_cwnd_test(tp, skb); | 1992 | cwnd_quota = tcp_cwnd_test(tp, skb); |
1990 | if (!cwnd_quota) | 1993 | if (!cwnd_quota) |
1991 | break; | 1994 | break; |
@@ -2026,6 +2029,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
2026 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) | 2029 | if (unlikely(tcp_transmit_skb(sk, skb, 1, gfp))) |
2027 | break; | 2030 | break; |
2028 | 2031 | ||
2032 | repair: | ||
2029 | /* Advance the send_head. This one is sent out. | 2033 | /* Advance the send_head. This one is sent out. |
2030 | * This call will increment packets_out. | 2034 | * This call will increment packets_out. |
2031 | */ | 2035 | */ |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index a7bee6a91335..4b4172dbbe64 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -827,6 +827,7 @@ pref_skip_coa: | |||
827 | if (val < 0 || val > 255) | 827 | if (val < 0 || val > 255) |
828 | goto e_inval; | 828 | goto e_inval; |
829 | np->min_hopcount = val; | 829 | np->min_hopcount = val; |
830 | retv = 0; | ||
830 | break; | 831 | break; |
831 | case IPV6_DONTFRAG: | 832 | case IPV6_DONTFRAG: |
832 | np->dontfrag = valbool; | 833 | np->dontfrag = valbool; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5eab1325a0f6..76690020d605 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2613,6 +2613,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | |||
2613 | else | 2613 | else |
2614 | local->probe_req_reg--; | 2614 | local->probe_req_reg--; |
2615 | 2615 | ||
2616 | if (!local->open_count) | ||
2617 | break; | ||
2618 | |||
2616 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); | 2619 | ieee80211_queue_work(&local->hw, &local->reconfig_filter); |
2617 | break; | 2620 | break; |
2618 | default: | 2621 | default: |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3026519b236a..32e47853f329 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1377,6 +1377,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, | |||
1377 | struct net_device *dev); | 1377 | struct net_device *dev); |
1378 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | 1378 | netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, |
1379 | struct net_device *dev); | 1379 | struct net_device *dev); |
1380 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
1381 | struct sk_buff_head *skbs); | ||
1380 | 1382 | ||
1381 | /* HT */ | 1383 | /* HT */ |
1382 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, | 1384 | void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index fd8345c20051..d6e43b08d629 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -920,8 +920,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
920 | local->hw.wiphy->cipher_suites, | 920 | local->hw.wiphy->cipher_suites, |
921 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, | 921 | sizeof(u32) * local->hw.wiphy->n_cipher_suites, |
922 | GFP_KERNEL); | 922 | GFP_KERNEL); |
923 | if (!suites) | 923 | if (!suites) { |
924 | return -ENOMEM; | 924 | result = -ENOMEM; |
925 | goto fail_wiphy_register; | ||
926 | } | ||
925 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { | 927 | for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { |
926 | u32 suite = local->hw.wiphy->cipher_suites[r]; | 928 | u32 suite = local->hw.wiphy->cipher_suites[r]; |
927 | if (suite == WLAN_CIPHER_SUITE_WEP40 || | 929 | if (suite == WLAN_CIPHER_SUITE_WEP40 || |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 13d23299e696..8e9bb168b73b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -934,7 +934,7 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, | |||
934 | struct cfg80211_sched_scan_request *req) | 934 | struct cfg80211_sched_scan_request *req) |
935 | { | 935 | { |
936 | struct ieee80211_local *local = sdata->local; | 936 | struct ieee80211_local *local = sdata->local; |
937 | struct ieee80211_sched_scan_ies sched_scan_ies; | 937 | struct ieee80211_sched_scan_ies sched_scan_ies = {}; |
938 | int ret, i; | 938 | int ret, i; |
939 | 939 | ||
940 | mutex_lock(&local->mtx); | 940 | mutex_lock(&local->mtx); |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index f7bb54f9ab72..e9d57689c05f 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -122,8 +122,8 @@ static void free_sta_work(struct work_struct *wk) | |||
122 | 122 | ||
123 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 123 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
124 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); | 124 | local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); |
125 | __skb_queue_purge(&sta->ps_tx_buf[ac]); | 125 | ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); |
126 | __skb_queue_purge(&sta->tx_filtered[ac]); | 126 | ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); |
127 | } | 127 | } |
128 | 128 | ||
129 | #ifdef CONFIG_MAC80211_MESH | 129 | #ifdef CONFIG_MAC80211_MESH |
@@ -146,7 +146,7 @@ static void free_sta_work(struct work_struct *wk) | |||
146 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); | 146 | tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); |
147 | if (!tid_tx) | 147 | if (!tid_tx) |
148 | continue; | 148 | continue; |
149 | __skb_queue_purge(&tid_tx->pending); | 149 | ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); |
150 | kfree(tid_tx); | 150 | kfree(tid_tx); |
151 | } | 151 | } |
152 | 152 | ||
@@ -982,6 +982,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
982 | struct ieee80211_local *local = sdata->local; | 982 | struct ieee80211_local *local = sdata->local; |
983 | struct sk_buff_head pending; | 983 | struct sk_buff_head pending; |
984 | int filtered = 0, buffered = 0, ac; | 984 | int filtered = 0, buffered = 0, ac; |
985 | unsigned long flags; | ||
985 | 986 | ||
986 | clear_sta_flag(sta, WLAN_STA_SP); | 987 | clear_sta_flag(sta, WLAN_STA_SP); |
987 | 988 | ||
@@ -997,12 +998,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
997 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { | 998 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { |
998 | int count = skb_queue_len(&pending), tmp; | 999 | int count = skb_queue_len(&pending), tmp; |
999 | 1000 | ||
1001 | spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags); | ||
1000 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); | 1002 | skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); |
1003 | spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags); | ||
1001 | tmp = skb_queue_len(&pending); | 1004 | tmp = skb_queue_len(&pending); |
1002 | filtered += tmp - count; | 1005 | filtered += tmp - count; |
1003 | count = tmp; | 1006 | count = tmp; |
1004 | 1007 | ||
1008 | spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags); | ||
1005 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); | 1009 | skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); |
1010 | spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags); | ||
1006 | tmp = skb_queue_len(&pending); | 1011 | tmp = skb_queue_len(&pending); |
1007 | buffered += tmp - count; | 1012 | buffered += tmp - count; |
1008 | } | 1013 | } |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 21fa5c72ea14..248247877eb6 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -669,3 +669,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
669 | dev_kfree_skb_any(skb); | 669 | dev_kfree_skb_any(skb); |
670 | } | 670 | } |
671 | EXPORT_SYMBOL(ieee80211_free_txskb); | 671 | EXPORT_SYMBOL(ieee80211_free_txskb); |
672 | |||
673 | void ieee80211_purge_tx_queue(struct ieee80211_hw *hw, | ||
674 | struct sk_buff_head *skbs) | ||
675 | { | ||
676 | struct sk_buff *skb; | ||
677 | |||
678 | while ((skb = __skb_dequeue(skbs))) | ||
679 | ieee80211_free_txskb(hw, skb); | ||
680 | } | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 065f81cb5618..6f1981816dc5 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1361,7 +1361,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1361 | if (tx->skb) | 1361 | if (tx->skb) |
1362 | ieee80211_free_txskb(&tx->local->hw, tx->skb); | 1362 | ieee80211_free_txskb(&tx->local->hw, tx->skb); |
1363 | else | 1363 | else |
1364 | __skb_queue_purge(&tx->skbs); | 1364 | ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); |
1365 | return -1; | 1365 | return -1; |
1366 | } else if (unlikely(res == TX_QUEUED)) { | 1366 | } else if (unlikely(res == TX_QUEUED)) { |
1367 | I802_DEBUG_INC(tx->local->tx_handlers_queued); | 1367 | I802_DEBUG_INC(tx->local->tx_handlers_queued); |
@@ -2160,10 +2160,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
2160 | */ | 2160 | */ |
2161 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) | 2161 | void ieee80211_clear_tx_pending(struct ieee80211_local *local) |
2162 | { | 2162 | { |
2163 | struct sk_buff *skb; | ||
2163 | int i; | 2164 | int i; |
2164 | 2165 | ||
2165 | for (i = 0; i < local->hw.queues; i++) | 2166 | for (i = 0; i < local->hw.queues; i++) { |
2166 | skb_queue_purge(&local->pending[i]); | 2167 | while ((skb = skb_dequeue(&local->pending[i])) != NULL) |
2168 | ieee80211_free_txskb(&local->hw, skb); | ||
2169 | } | ||
2167 | } | 2170 | } |
2168 | 2171 | ||
2169 | /* | 2172 | /* |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 9556391b05d7..acbb8c9bae2a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1534,6 +1534,8 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1534 | list_for_each_entry(sdata, &local->interfaces, list) { | 1534 | list_for_each_entry(sdata, &local->interfaces, list) { |
1535 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 1535 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
1536 | continue; | 1536 | continue; |
1537 | if (!sdata->u.mgd.associated) | ||
1538 | continue; | ||
1537 | 1539 | ||
1538 | ieee80211_send_nullfunc(local, sdata, 0); | 1540 | ieee80211_send_nullfunc(local, sdata, 0); |
1539 | } | 1541 | } |
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index c3bea269faf4..9966e7b16451 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -102,7 +102,7 @@ static const struct file_operations sctp_snmp_seq_fops = { | |||
102 | .open = sctp_snmp_seq_open, | 102 | .open = sctp_snmp_seq_open, |
103 | .read = seq_read, | 103 | .read = seq_read, |
104 | .llseek = seq_lseek, | 104 | .llseek = seq_lseek, |
105 | .release = single_release, | 105 | .release = single_release_net, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | /* Set up the proc fs entry for 'snmp' object. */ | 108 | /* Set up the proc fs entry for 'snmp' object. */ |
@@ -251,7 +251,7 @@ static const struct file_operations sctp_eps_seq_fops = { | |||
251 | .open = sctp_eps_seq_open, | 251 | .open = sctp_eps_seq_open, |
252 | .read = seq_read, | 252 | .read = seq_read, |
253 | .llseek = seq_lseek, | 253 | .llseek = seq_lseek, |
254 | .release = seq_release, | 254 | .release = seq_release_net, |
255 | }; | 255 | }; |
256 | 256 | ||
257 | /* Set up the proc fs entry for 'eps' object. */ | 257 | /* Set up the proc fs entry for 'eps' object. */ |
@@ -372,7 +372,7 @@ static const struct file_operations sctp_assocs_seq_fops = { | |||
372 | .open = sctp_assocs_seq_open, | 372 | .open = sctp_assocs_seq_open, |
373 | .read = seq_read, | 373 | .read = seq_read, |
374 | .llseek = seq_lseek, | 374 | .llseek = seq_lseek, |
375 | .release = seq_release, | 375 | .release = seq_release_net, |
376 | }; | 376 | }; |
377 | 377 | ||
378 | /* Set up the proc fs entry for 'assocs' object. */ | 378 | /* Set up the proc fs entry for 'assocs' object. */ |
@@ -517,7 +517,7 @@ static const struct file_operations sctp_remaddr_seq_fops = { | |||
517 | .open = sctp_remaddr_seq_open, | 517 | .open = sctp_remaddr_seq_open, |
518 | .read = seq_read, | 518 | .read = seq_read, |
519 | .llseek = seq_lseek, | 519 | .llseek = seq_lseek, |
520 | .release = seq_release, | 520 | .release = seq_release_net, |
521 | }; | 521 | }; |
522 | 522 | ||
523 | int __net_init sctp_remaddr_proc_init(struct net *net) | 523 | int __net_init sctp_remaddr_proc_init(struct net *net) |
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c index 5a3d675d2f2f..a9c0bbccad6b 100644 --- a/net/sunrpc/backchannel_rqst.c +++ b/net/sunrpc/backchannel_rqst.c | |||
@@ -172,7 +172,7 @@ out_free: | |||
172 | xprt_free_allocation(req); | 172 | xprt_free_allocation(req); |
173 | 173 | ||
174 | dprintk("RPC: setup backchannel transport failed\n"); | 174 | dprintk("RPC: setup backchannel transport failed\n"); |
175 | return -1; | 175 | return -ENOMEM; |
176 | } | 176 | } |
177 | EXPORT_SYMBOL_GPL(xprt_setup_backchannel); | 177 | EXPORT_SYMBOL_GPL(xprt_setup_backchannel); |
178 | 178 | ||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bcc7d7ee5a51..b75756b05af7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -141,9 +141,8 @@ static const struct ieee80211_regdomain world_regdom = { | |||
141 | .reg_rules = { | 141 | .reg_rules = { |
142 | /* IEEE 802.11b/g, channels 1..11 */ | 142 | /* IEEE 802.11b/g, channels 1..11 */ |
143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), | 143 | REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), |
144 | /* IEEE 802.11b/g, channels 12..13. No HT40 | 144 | /* IEEE 802.11b/g, channels 12..13. */ |
145 | * channel fits here. */ | 145 | REG_RULE(2467-10, 2472+10, 40, 6, 20, |
146 | REG_RULE(2467-10, 2472+10, 20, 6, 20, | ||
147 | NL80211_RRF_PASSIVE_SCAN | | 146 | NL80211_RRF_PASSIVE_SCAN | |
148 | NL80211_RRF_NO_IBSS), | 147 | NL80211_RRF_NO_IBSS), |
149 | /* IEEE 802.11 channel 14 - Only JP enables | 148 | /* IEEE 802.11 channel 14 - Only JP enables |