diff options
34 files changed, 149 insertions, 98 deletions
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt index bdae2db4119c..bec69a8a1697 100644 --- a/Documentation/networking/bridge.txt +++ b/Documentation/networking/bridge.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | In order to use the Ethernet bridging functionality, you'll need the | 1 | In order to use the Ethernet bridging functionality, you'll need the |
2 | userspace tools. These programs and documentation are available | 2 | userspace tools. These programs and documentation are available |
3 | at http://bridge.sourceforge.net. The download page is | 3 | at http://www.linux-foundation.org/en/Net:Bridge. The download page is |
4 | http://prdownloads.sourceforge.net/bridge. | 4 | http://prdownloads.sourceforge.net/bridge. |
5 | 5 | ||
6 | If you still have questions, don't hesitate to post to the mailing list | 6 | If you still have questions, don't hesitate to post to the mailing list |
diff --git a/MAINTAINERS b/MAINTAINERS index 0a6d2ca03cea..46fa1797707a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1611,7 +1611,7 @@ ETHERNET BRIDGE | |||
1611 | P: Stephen Hemminger | 1611 | P: Stephen Hemminger |
1612 | M: shemminger@linux-foundation.org | 1612 | M: shemminger@linux-foundation.org |
1613 | L: bridge@lists.linux-foundation.org | 1613 | L: bridge@lists.linux-foundation.org |
1614 | W: http://bridge.sourceforge.net/ | 1614 | W: http://www.linux-foundation.org/en/Net:Bridge |
1615 | S: Maintained | 1615 | S: Maintained |
1616 | 1616 | ||
1617 | ETHERTEAM 16I DRIVER | 1617 | ETHERTEAM 16I DRIVER |
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 6e4c80d41b08..6ddc911e7d15 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -2023,6 +2023,7 @@ rrd_ok: | |||
2023 | /* Good Receive */ | 2023 | /* Good Receive */ |
2024 | pci_unmap_page(adapter->pdev, buffer_info->dma, | 2024 | pci_unmap_page(adapter->pdev, buffer_info->dma, |
2025 | buffer_info->length, PCI_DMA_FROMDEVICE); | 2025 | buffer_info->length, PCI_DMA_FROMDEVICE); |
2026 | buffer_info->dma = 0; | ||
2026 | skb = buffer_info->skb; | 2027 | skb = buffer_info->skb; |
2027 | length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); | 2028 | length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); |
2028 | 2029 | ||
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 348371fda597..fba87abe78ee 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -1394,7 +1394,11 @@ net_open(struct net_device *dev) | |||
1394 | #endif | 1394 | #endif |
1395 | if (!result) { | 1395 | if (!result) { |
1396 | printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); | 1396 | printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); |
1397 | release_irq: | 1397 | release_dma: |
1398 | #if ALLOW_DMA | ||
1399 | free_dma(dev->dma); | ||
1400 | #endif | ||
1401 | release_irq: | ||
1398 | #if ALLOW_DMA | 1402 | #if ALLOW_DMA |
1399 | release_dma_buff(lp); | 1403 | release_dma_buff(lp); |
1400 | #endif | 1404 | #endif |
@@ -1442,12 +1446,12 @@ net_open(struct net_device *dev) | |||
1442 | if ((result = detect_bnc(dev)) != DETECTED_NONE) | 1446 | if ((result = detect_bnc(dev)) != DETECTED_NONE) |
1443 | break; | 1447 | break; |
1444 | printk(KERN_ERR "%s: no media detected\n", dev->name); | 1448 | printk(KERN_ERR "%s: no media detected\n", dev->name); |
1445 | goto release_irq; | 1449 | goto release_dma; |
1446 | } | 1450 | } |
1447 | switch(result) { | 1451 | switch(result) { |
1448 | case DETECTED_NONE: | 1452 | case DETECTED_NONE: |
1449 | printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); | 1453 | printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); |
1450 | goto release_irq; | 1454 | goto release_dma; |
1451 | case DETECTED_RJ45H: | 1455 | case DETECTED_RJ45H: |
1452 | printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); | 1456 | printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); |
1453 | break; | 1457 | break; |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 36be6efc6398..e0d76c75aea0 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -75,7 +75,7 @@ | |||
75 | #include "myri10ge_mcp.h" | 75 | #include "myri10ge_mcp.h" |
76 | #include "myri10ge_mcp_gen_header.h" | 76 | #include "myri10ge_mcp_gen_header.h" |
77 | 77 | ||
78 | #define MYRI10GE_VERSION_STR "1.3.2-1.287" | 78 | #define MYRI10GE_VERSION_STR "1.3.99-1.347" |
79 | 79 | ||
80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); | 80 | MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); |
81 | MODULE_AUTHOR("Maintainer: help@myri.com"); | 81 | MODULE_AUTHOR("Maintainer: help@myri.com"); |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index b4b63805ee8f..61955f8d8011 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -972,7 +972,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
972 | skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE); | 972 | skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE); |
973 | 973 | ||
974 | len = skb->len; | 974 | len = skb->len; |
975 | if (unlikely(len < ETH_ZLEN)) { | 975 | if (len < ETH_ZLEN) { |
976 | memset(priv->tx_bufs + entry * TX_BUF_SIZE + len, | 976 | memset(priv->tx_bufs + entry * TX_BUF_SIZE + len, |
977 | 0, ETH_ZLEN - len); | 977 | 0, ETH_ZLEN - len); |
978 | len = ETH_ZLEN; | 978 | len = ETH_ZLEN; |
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c index dbdcee4b0f8d..55c0d9760be8 100644 --- a/drivers/net/sfc/falcon_xmac.c +++ b/drivers/net/sfc/falcon_xmac.c | |||
@@ -459,7 +459,7 @@ static int falcon_check_xaui_link_up(struct efx_nic *efx) | |||
459 | tries--; | 459 | tries--; |
460 | } | 460 | } |
461 | 461 | ||
462 | EFX_ERR(efx, "Failed to bring XAUI link back up in %d tries!\n", | 462 | EFX_LOG(efx, "Failed to bring XAUI link back up in %d tries!\n", |
463 | max_tries); | 463 | max_tries); |
464 | return 0; | 464 | return 0; |
465 | } | 465 | } |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index b4e7f30ea4e8..1aa425be3067 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -111,7 +111,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne | |||
111 | struct hme_tx_logent *tlp; | 111 | struct hme_tx_logent *tlp; |
112 | unsigned long flags; | 112 | unsigned long flags; |
113 | 113 | ||
114 | save_and_cli(flags); | 114 | local_irq_save(flags); |
115 | tlp = &tx_log[txlog_cur_entry]; | 115 | tlp = &tx_log[txlog_cur_entry]; |
116 | tlp->tstamp = (unsigned int)jiffies; | 116 | tlp->tstamp = (unsigned int)jiffies; |
117 | tlp->tx_new = hp->tx_new; | 117 | tlp->tx_new = hp->tx_new; |
@@ -119,7 +119,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne | |||
119 | tlp->action = a; | 119 | tlp->action = a; |
120 | tlp->status = s; | 120 | tlp->status = s; |
121 | txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1); | 121 | txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1); |
122 | restore_flags(flags); | 122 | local_irq_restore(flags); |
123 | } | 123 | } |
124 | static __inline__ void tx_dump_log(void) | 124 | static __inline__ void tx_dump_log(void) |
125 | { | 125 | { |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index f9d13fa05d64..55670b5eb611 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -1729,12 +1729,15 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state) | |||
1729 | if (!dev) | 1729 | if (!dev) |
1730 | return -EINVAL; | 1730 | return -EINVAL; |
1731 | 1731 | ||
1732 | if (netif_running(dev)) | 1732 | if (!netif_running(dev)) |
1733 | tulip_down(dev); | 1733 | goto save_state; |
1734 | |||
1735 | tulip_down(dev); | ||
1734 | 1736 | ||
1735 | netif_device_detach(dev); | 1737 | netif_device_detach(dev); |
1736 | free_irq(dev->irq, dev); | 1738 | free_irq(dev->irq, dev); |
1737 | 1739 | ||
1740 | save_state: | ||
1738 | pci_save_state(pdev); | 1741 | pci_save_state(pdev); |
1739 | pci_disable_device(pdev); | 1742 | pci_disable_device(pdev); |
1740 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 1743 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
@@ -1754,6 +1757,9 @@ static int tulip_resume(struct pci_dev *pdev) | |||
1754 | pci_set_power_state(pdev, PCI_D0); | 1757 | pci_set_power_state(pdev, PCI_D0); |
1755 | pci_restore_state(pdev); | 1758 | pci_restore_state(pdev); |
1756 | 1759 | ||
1760 | if (!netif_running(dev)) | ||
1761 | return 0; | ||
1762 | |||
1757 | if ((retval = pci_enable_device(pdev))) { | 1763 | if ((retval = pci_enable_device(pdev))) { |
1758 | printk (KERN_ERR "tulip: pci_enable_device failed in resume\n"); | 1764 | printk (KERN_ERR "tulip: pci_enable_device failed in resume\n"); |
1759 | return retval; | 1765 | return retval; |
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c index 299b7f176950..f5839c4a5cbd 100644 --- a/drivers/net/ucc_geth_ethtool.c +++ b/drivers/net/ucc_geth_ethtool.c | |||
@@ -73,6 +73,7 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { | |||
73 | "tx-frames-ok", | 73 | "tx-frames-ok", |
74 | "tx-excessive-differ-frames", | 74 | "tx-excessive-differ-frames", |
75 | "tx-256-511-frames", | 75 | "tx-256-511-frames", |
76 | "tx-512-1023-frames", | ||
76 | "tx-1024-1518-frames", | 77 | "tx-1024-1518-frames", |
77 | "tx-jumbo-frames", | 78 | "tx-jumbo-frames", |
78 | }; | 79 | }; |
@@ -308,7 +309,7 @@ static void uec_get_strings(struct net_device *netdev, u32 stringset, u8 *buf) | |||
308 | buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN; | 309 | buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN; |
309 | } | 310 | } |
310 | if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) | 311 | if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) |
311 | memcpy(buf, tx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN * | 312 | memcpy(buf, rx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN * |
312 | ETH_GSTRING_LEN); | 313 | ETH_GSTRING_LEN); |
313 | } | 314 | } |
314 | 315 | ||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index fe7cdf2a2a23..5450eac9e263 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -47,6 +47,9 @@ struct virtnet_info | |||
47 | /* Number of input buffers, and max we've ever had. */ | 47 | /* Number of input buffers, and max we've ever had. */ |
48 | unsigned int num, max; | 48 | unsigned int num, max; |
49 | 49 | ||
50 | /* For cleaning up after transmission. */ | ||
51 | struct tasklet_struct tasklet; | ||
52 | |||
50 | /* Receive & send queues. */ | 53 | /* Receive & send queues. */ |
51 | struct sk_buff_head recv; | 54 | struct sk_buff_head recv; |
52 | struct sk_buff_head send; | 55 | struct sk_buff_head send; |
@@ -68,8 +71,13 @@ static void skb_xmit_done(struct virtqueue *svq) | |||
68 | 71 | ||
69 | /* Suppress further interrupts. */ | 72 | /* Suppress further interrupts. */ |
70 | svq->vq_ops->disable_cb(svq); | 73 | svq->vq_ops->disable_cb(svq); |
74 | |||
71 | /* We were waiting for more output buffers. */ | 75 | /* We were waiting for more output buffers. */ |
72 | netif_wake_queue(vi->dev); | 76 | netif_wake_queue(vi->dev); |
77 | |||
78 | /* Make sure we re-xmit last_xmit_skb: if there are no more packets | ||
79 | * queued, start_xmit won't be called. */ | ||
80 | tasklet_schedule(&vi->tasklet); | ||
73 | } | 81 | } |
74 | 82 | ||
75 | static void receive_skb(struct net_device *dev, struct sk_buff *skb, | 83 | static void receive_skb(struct net_device *dev, struct sk_buff *skb, |
@@ -278,6 +286,18 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
278 | return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); | 286 | return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); |
279 | } | 287 | } |
280 | 288 | ||
289 | static void xmit_tasklet(unsigned long data) | ||
290 | { | ||
291 | struct virtnet_info *vi = (void *)data; | ||
292 | |||
293 | netif_tx_lock_bh(vi->dev); | ||
294 | if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) { | ||
295 | vi->svq->vq_ops->kick(vi->svq); | ||
296 | vi->last_xmit_skb = NULL; | ||
297 | } | ||
298 | netif_tx_unlock_bh(vi->dev); | ||
299 | } | ||
300 | |||
281 | static int start_xmit(struct sk_buff *skb, struct net_device *dev) | 301 | static int start_xmit(struct sk_buff *skb, struct net_device *dev) |
282 | { | 302 | { |
283 | struct virtnet_info *vi = netdev_priv(dev); | 303 | struct virtnet_info *vi = netdev_priv(dev); |
@@ -287,21 +307,25 @@ again: | |||
287 | free_old_xmit_skbs(vi); | 307 | free_old_xmit_skbs(vi); |
288 | 308 | ||
289 | /* If we has a buffer left over from last time, send it now. */ | 309 | /* If we has a buffer left over from last time, send it now. */ |
290 | if (vi->last_xmit_skb) { | 310 | if (unlikely(vi->last_xmit_skb)) { |
291 | if (xmit_skb(vi, vi->last_xmit_skb) != 0) { | 311 | if (xmit_skb(vi, vi->last_xmit_skb) != 0) { |
292 | /* Drop this skb: we only queue one. */ | 312 | /* Drop this skb: we only queue one. */ |
293 | vi->dev->stats.tx_dropped++; | 313 | vi->dev->stats.tx_dropped++; |
294 | kfree_skb(skb); | 314 | kfree_skb(skb); |
315 | skb = NULL; | ||
295 | goto stop_queue; | 316 | goto stop_queue; |
296 | } | 317 | } |
297 | vi->last_xmit_skb = NULL; | 318 | vi->last_xmit_skb = NULL; |
298 | } | 319 | } |
299 | 320 | ||
300 | /* Put new one in send queue and do transmit */ | 321 | /* Put new one in send queue and do transmit */ |
301 | __skb_queue_head(&vi->send, skb); | 322 | if (likely(skb)) { |
302 | if (xmit_skb(vi, skb) != 0) { | 323 | __skb_queue_head(&vi->send, skb); |
303 | vi->last_xmit_skb = skb; | 324 | if (xmit_skb(vi, skb) != 0) { |
304 | goto stop_queue; | 325 | vi->last_xmit_skb = skb; |
326 | skb = NULL; | ||
327 | goto stop_queue; | ||
328 | } | ||
305 | } | 329 | } |
306 | done: | 330 | done: |
307 | vi->svq->vq_ops->kick(vi->svq); | 331 | vi->svq->vq_ops->kick(vi->svq); |
@@ -428,6 +452,8 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
428 | skb_queue_head_init(&vi->recv); | 452 | skb_queue_head_init(&vi->recv); |
429 | skb_queue_head_init(&vi->send); | 453 | skb_queue_head_init(&vi->send); |
430 | 454 | ||
455 | tasklet_init(&vi->tasklet, xmit_tasklet, (unsigned long)vi); | ||
456 | |||
431 | err = register_netdev(dev); | 457 | err = register_netdev(dev); |
432 | if (err) { | 458 | if (err) { |
433 | pr_debug("virtio_net: registering device failed\n"); | 459 | pr_debug("virtio_net: registering device failed\n"); |
diff --git a/include/linux/in_route.h b/include/linux/in_route.h index 61f25c30a2a0..b261b8c915f0 100644 --- a/include/linux/in_route.h +++ b/include/linux/in_route.h | |||
@@ -10,19 +10,19 @@ | |||
10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC | 10 | #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC |
11 | 11 | ||
12 | #define RTCF_NOTIFY 0x00010000 | 12 | #define RTCF_NOTIFY 0x00010000 |
13 | #define RTCF_DIRECTDST 0x00020000 | 13 | #define RTCF_DIRECTDST 0x00020000 /* unused */ |
14 | #define RTCF_REDIRECTED 0x00040000 | 14 | #define RTCF_REDIRECTED 0x00040000 |
15 | #define RTCF_TPROXY 0x00080000 | 15 | #define RTCF_TPROXY 0x00080000 /* unused */ |
16 | 16 | ||
17 | #define RTCF_FAST 0x00200000 | 17 | #define RTCF_FAST 0x00200000 /* unused */ |
18 | #define RTCF_MASQ 0x00400000 | 18 | #define RTCF_MASQ 0x00400000 /* unused */ |
19 | #define RTCF_SNAT 0x00800000 | 19 | #define RTCF_SNAT 0x00800000 /* unused */ |
20 | #define RTCF_DOREDIRECT 0x01000000 | 20 | #define RTCF_DOREDIRECT 0x01000000 |
21 | #define RTCF_DIRECTSRC 0x04000000 | 21 | #define RTCF_DIRECTSRC 0x04000000 |
22 | #define RTCF_DNAT 0x08000000 | 22 | #define RTCF_DNAT 0x08000000 |
23 | #define RTCF_BROADCAST 0x10000000 | 23 | #define RTCF_BROADCAST 0x10000000 |
24 | #define RTCF_MULTICAST 0x20000000 | 24 | #define RTCF_MULTICAST 0x20000000 |
25 | #define RTCF_REJECT 0x40000000 | 25 | #define RTCF_REJECT 0x40000000 /* unused */ |
26 | #define RTCF_LOCAL 0x80000000 | 26 | #define RTCF_LOCAL 0x80000000 |
27 | 27 | ||
28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) | 28 | #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 7009b0cdd06f..c6f51ad52d5b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -117,7 +117,6 @@ struct in_ifaddr | |||
117 | __be32 ifa_address; | 117 | __be32 ifa_address; |
118 | __be32 ifa_mask; | 118 | __be32 ifa_mask; |
119 | __be32 ifa_broadcast; | 119 | __be32 ifa_broadcast; |
120 | __be32 ifa_anycast; | ||
121 | unsigned char ifa_scope; | 120 | unsigned char ifa_scope; |
122 | unsigned char ifa_flags; | 121 | unsigned char ifa_flags; |
123 | unsigned char ifa_prefixlen; | 122 | unsigned char ifa_prefixlen; |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 44c81c744538..a2aec2c0cfb5 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -267,10 +267,10 @@ enum rtattr_type_t | |||
267 | RTA_PREFSRC, | 267 | RTA_PREFSRC, |
268 | RTA_METRICS, | 268 | RTA_METRICS, |
269 | RTA_MULTIPATH, | 269 | RTA_MULTIPATH, |
270 | RTA_PROTOINFO, | 270 | RTA_PROTOINFO, /* no longer used */ |
271 | RTA_FLOW, | 271 | RTA_FLOW, |
272 | RTA_CACHEINFO, | 272 | RTA_CACHEINFO, |
273 | RTA_SESSION, | 273 | RTA_SESSION, /* no longer used */ |
274 | RTA_MP_ALGO, /* no longer used */ | 274 | RTA_MP_ALGO, /* no longer used */ |
275 | RTA_TABLE, | 275 | RTA_TABLE, |
276 | __RTA_MAX | 276 | __RTA_MAX |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 112dcdf7e34e..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -775,7 +773,7 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
775 | int nested_len = nla_len(nla) - NLA_ALIGN(len); | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | 774 | ||
777 | if (nested_len < 0) | 775 | if (nested_len < 0) |
778 | return -1; | 776 | return -EINVAL; |
779 | if (nested_len >= nla_attr_size(0)) | 777 | if (nested_len >= nla_attr_size(0)) |
780 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
781 | nested_len, policy); | 779 | nested_len, policy); |
@@ -1080,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1080 | * @start: container attribute | 1078 | * @start: container attribute |
1081 | * | 1079 | * |
1082 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1083 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1084 | */ | 1082 | */ |
1085 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1086 | { | 1084 | { |
1087 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1088 | } | 1086 | } |
1089 | 1087 | ||
1090 | /** | 1088 | /** |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5d9d7130bd6e..65f01f71b3f3 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1714,7 +1714,8 @@ static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms) | |||
1714 | return nla_nest_end(skb, nest); | 1714 | return nla_nest_end(skb, nest); |
1715 | 1715 | ||
1716 | nla_put_failure: | 1716 | nla_put_failure: |
1717 | return nla_nest_cancel(skb, nest); | 1717 | nla_nest_cancel(skb, nest); |
1718 | return -EMSGSIZE; | ||
1718 | } | 1719 | } |
1719 | 1720 | ||
1720 | static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl, | 1721 | static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl, |
@@ -2057,9 +2058,9 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh, | |||
2057 | goto nla_put_failure; | 2058 | goto nla_put_failure; |
2058 | } | 2059 | } |
2059 | 2060 | ||
2060 | ci.ndm_used = now - neigh->used; | 2061 | ci.ndm_used = jiffies_to_clock_t(now - neigh->used); |
2061 | ci.ndm_confirmed = now - neigh->confirmed; | 2062 | ci.ndm_confirmed = jiffies_to_clock_t(now - neigh->confirmed); |
2062 | ci.ndm_updated = now - neigh->updated; | 2063 | ci.ndm_updated = jiffies_to_clock_t(now - neigh->updated); |
2063 | ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1; | 2064 | ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1; |
2064 | read_unlock_bh(&neigh->lock); | 2065 | read_unlock_bh(&neigh->lock); |
2065 | 2066 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index cf857c4dc7b1..a9a77216310e 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -498,7 +498,8 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics) | |||
498 | return nla_nest_end(skb, mx); | 498 | return nla_nest_end(skb, mx); |
499 | 499 | ||
500 | nla_put_failure: | 500 | nla_put_failure: |
501 | return nla_nest_cancel(skb, mx); | 501 | nla_nest_cancel(skb, mx); |
502 | return -EMSGSIZE; | ||
502 | } | 503 | } |
503 | 504 | ||
504 | int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, | 505 | int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, |
diff --git a/net/core/user_dma.c b/net/core/user_dma.c index 0ad1cd57bc39..c77aff9c6eb3 100644 --- a/net/core/user_dma.c +++ b/net/core/user_dma.c | |||
@@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan, | |||
75 | 75 | ||
76 | end = start + skb_shinfo(skb)->frags[i].size; | 76 | end = start + skb_shinfo(skb)->frags[i].size; |
77 | copy = end - offset; | 77 | copy = end - offset; |
78 | if ((copy = end - offset) > 0) { | 78 | if (copy > 0) { |
79 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 79 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
80 | struct page *page = frag->page; | 80 | struct page *page = frag->page; |
81 | 81 | ||
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 6848e4760f34..79a7ef6209ff 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -90,7 +90,6 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = { | |||
90 | [IFA_LOCAL] = { .type = NLA_U32 }, | 90 | [IFA_LOCAL] = { .type = NLA_U32 }, |
91 | [IFA_ADDRESS] = { .type = NLA_U32 }, | 91 | [IFA_ADDRESS] = { .type = NLA_U32 }, |
92 | [IFA_BROADCAST] = { .type = NLA_U32 }, | 92 | [IFA_BROADCAST] = { .type = NLA_U32 }, |
93 | [IFA_ANYCAST] = { .type = NLA_U32 }, | ||
94 | [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, | 93 | [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, |
95 | }; | 94 | }; |
96 | 95 | ||
@@ -536,9 +535,6 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh) | |||
536 | if (tb[IFA_BROADCAST]) | 535 | if (tb[IFA_BROADCAST]) |
537 | ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]); | 536 | ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]); |
538 | 537 | ||
539 | if (tb[IFA_ANYCAST]) | ||
540 | ifa->ifa_anycast = nla_get_be32(tb[IFA_ANYCAST]); | ||
541 | |||
542 | if (tb[IFA_LABEL]) | 538 | if (tb[IFA_LABEL]) |
543 | nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ); | 539 | nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ); |
544 | else | 540 | else |
@@ -745,7 +741,6 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg) | |||
745 | break; | 741 | break; |
746 | inet_del_ifa(in_dev, ifap, 0); | 742 | inet_del_ifa(in_dev, ifap, 0); |
747 | ifa->ifa_broadcast = 0; | 743 | ifa->ifa_broadcast = 0; |
748 | ifa->ifa_anycast = 0; | ||
749 | ifa->ifa_scope = 0; | 744 | ifa->ifa_scope = 0; |
750 | } | 745 | } |
751 | 746 | ||
@@ -1113,7 +1108,6 @@ static inline size_t inet_nlmsg_size(void) | |||
1113 | + nla_total_size(4) /* IFA_ADDRESS */ | 1108 | + nla_total_size(4) /* IFA_ADDRESS */ |
1114 | + nla_total_size(4) /* IFA_LOCAL */ | 1109 | + nla_total_size(4) /* IFA_LOCAL */ |
1115 | + nla_total_size(4) /* IFA_BROADCAST */ | 1110 | + nla_total_size(4) /* IFA_BROADCAST */ |
1116 | + nla_total_size(4) /* IFA_ANYCAST */ | ||
1117 | + nla_total_size(IFNAMSIZ); /* IFA_LABEL */ | 1111 | + nla_total_size(IFNAMSIZ); /* IFA_LABEL */ |
1118 | } | 1112 | } |
1119 | 1113 | ||
@@ -1143,9 +1137,6 @@ static int inet_fill_ifaddr(struct sk_buff *skb, struct in_ifaddr *ifa, | |||
1143 | if (ifa->ifa_broadcast) | 1137 | if (ifa->ifa_broadcast) |
1144 | NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast); | 1138 | NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast); |
1145 | 1139 | ||
1146 | if (ifa->ifa_anycast) | ||
1147 | NLA_PUT_BE32(skb, IFA_ANYCAST, ifa->ifa_anycast); | ||
1148 | |||
1149 | if (ifa->ifa_label[0]) | 1140 | if (ifa->ifa_label[0]) |
1150 | NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label); | 1141 | NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label); |
1151 | 1142 | ||
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 0f1557a4ac7a..0b2ac6a3d903 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -506,7 +506,6 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX+1] = { | |||
506 | [RTA_PREFSRC] = { .type = NLA_U32 }, | 506 | [RTA_PREFSRC] = { .type = NLA_U32 }, |
507 | [RTA_METRICS] = { .type = NLA_NESTED }, | 507 | [RTA_METRICS] = { .type = NLA_NESTED }, |
508 | [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, | 508 | [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, |
509 | [RTA_PROTOINFO] = { .type = NLA_U32 }, | ||
510 | [RTA_FLOW] = { .type = NLA_U32 }, | 509 | [RTA_FLOW] = { .type = NLA_U32 }, |
511 | }; | 510 | }; |
512 | 511 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index df41026b60db..96be336064fb 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1792,7 +1792,7 @@ static int __mkroute_input(struct sk_buff *skb, | |||
1792 | if (err) | 1792 | if (err) |
1793 | flags |= RTCF_DIRECTSRC; | 1793 | flags |= RTCF_DIRECTSRC; |
1794 | 1794 | ||
1795 | if (out_dev == in_dev && err && !(flags & RTCF_MASQ) && | 1795 | if (out_dev == in_dev && err && |
1796 | (IN_DEV_SHARED_MEDIA(out_dev) || | 1796 | (IN_DEV_SHARED_MEDIA(out_dev) || |
1797 | inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) | 1797 | inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) |
1798 | flags |= RTCF_DOREDIRECT; | 1798 | flags |= RTCF_DOREDIRECT; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index b54d9d37b636..eba873e9b560 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1392,9 +1392,9 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb, | |||
1392 | 1392 | ||
1393 | if (before(next_dup->start_seq, skip_to_seq)) { | 1393 | if (before(next_dup->start_seq, skip_to_seq)) { |
1394 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); | 1394 | skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); |
1395 | tcp_sacktag_walk(skb, sk, NULL, | 1395 | skb = tcp_sacktag_walk(skb, sk, NULL, |
1396 | next_dup->start_seq, next_dup->end_seq, | 1396 | next_dup->start_seq, next_dup->end_seq, |
1397 | 1, fack_count, reord, flag); | 1397 | 1, fack_count, reord, flag); |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | return skb; | 1400 | return skb; |
@@ -2483,6 +2483,20 @@ static inline void tcp_complete_cwr(struct sock *sk) | |||
2483 | tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); | 2483 | tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); |
2484 | } | 2484 | } |
2485 | 2485 | ||
2486 | static void tcp_try_keep_open(struct sock *sk) | ||
2487 | { | ||
2488 | struct tcp_sock *tp = tcp_sk(sk); | ||
2489 | int state = TCP_CA_Open; | ||
2490 | |||
2491 | if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker) | ||
2492 | state = TCP_CA_Disorder; | ||
2493 | |||
2494 | if (inet_csk(sk)->icsk_ca_state != state) { | ||
2495 | tcp_set_ca_state(sk, state); | ||
2496 | tp->high_seq = tp->snd_nxt; | ||
2497 | } | ||
2498 | } | ||
2499 | |||
2486 | static void tcp_try_to_open(struct sock *sk, int flag) | 2500 | static void tcp_try_to_open(struct sock *sk, int flag) |
2487 | { | 2501 | { |
2488 | struct tcp_sock *tp = tcp_sk(sk); | 2502 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -2496,15 +2510,7 @@ static void tcp_try_to_open(struct sock *sk, int flag) | |||
2496 | tcp_enter_cwr(sk, 1); | 2510 | tcp_enter_cwr(sk, 1); |
2497 | 2511 | ||
2498 | if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { | 2512 | if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { |
2499 | int state = TCP_CA_Open; | 2513 | tcp_try_keep_open(sk); |
2500 | |||
2501 | if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker) | ||
2502 | state = TCP_CA_Disorder; | ||
2503 | |||
2504 | if (inet_csk(sk)->icsk_ca_state != state) { | ||
2505 | tcp_set_ca_state(sk, state); | ||
2506 | tp->high_seq = tp->snd_nxt; | ||
2507 | } | ||
2508 | tcp_moderate_cwnd(tp); | 2514 | tcp_moderate_cwnd(tp); |
2509 | } else { | 2515 | } else { |
2510 | tcp_cwnd_down(sk, flag); | 2516 | tcp_cwnd_down(sk, flag); |
@@ -3310,8 +3316,11 @@ no_queue: | |||
3310 | return 1; | 3316 | return 1; |
3311 | 3317 | ||
3312 | old_ack: | 3318 | old_ack: |
3313 | if (TCP_SKB_CB(skb)->sacked) | 3319 | if (TCP_SKB_CB(skb)->sacked) { |
3314 | tcp_sacktag_write_queue(sk, skb, prior_snd_una); | 3320 | tcp_sacktag_write_queue(sk, skb, prior_snd_una); |
3321 | if (icsk->icsk_ca_state == TCP_CA_Open) | ||
3322 | tcp_try_keep_open(sk); | ||
3323 | } | ||
3315 | 3324 | ||
3316 | uninteresting_ack: | 3325 | uninteresting_ack: |
3317 | SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt); | 3326 | SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 2dccad48058c..e65e26e210ee 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -209,7 +209,9 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst) | |||
209 | arg.dst = dst; | 209 | arg.dst = dst; |
210 | hash = ip6qhashfn(id, src, dst); | 210 | hash = ip6qhashfn(id, src, dst); |
211 | 211 | ||
212 | local_bh_disable(); | ||
212 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); | 213 | q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); |
214 | local_bh_enable(); | ||
213 | if (q == NULL) | 215 | if (q == NULL) |
214 | goto oom; | 216 | goto oom; |
215 | 217 | ||
@@ -638,10 +640,10 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb) | |||
638 | goto ret_orig; | 640 | goto ret_orig; |
639 | } | 641 | } |
640 | 642 | ||
641 | spin_lock(&fq->q.lock); | 643 | spin_lock_bh(&fq->q.lock); |
642 | 644 | ||
643 | if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) { | 645 | if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) { |
644 | spin_unlock(&fq->q.lock); | 646 | spin_unlock_bh(&fq->q.lock); |
645 | pr_debug("Can't insert skb to queue\n"); | 647 | pr_debug("Can't insert skb to queue\n"); |
646 | fq_put(fq); | 648 | fq_put(fq); |
647 | goto ret_orig; | 649 | goto ret_orig; |
@@ -653,7 +655,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb) | |||
653 | if (ret_skb == NULL) | 655 | if (ret_skb == NULL) |
654 | pr_debug("Can't reassemble fragmented packets\n"); | 656 | pr_debug("Can't reassemble fragmented packets\n"); |
655 | } | 657 | } |
656 | spin_unlock(&fq->q.lock); | 658 | spin_unlock_bh(&fq->q.lock); |
657 | 659 | ||
658 | fq_put(fq); | 660 | fq_put(fq); |
659 | return ret_skb; | 661 | return ret_skb; |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index ae54b20d0470..3eb5bcc75f99 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -1093,11 +1093,6 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1093 | 1093 | ||
1094 | init_waitqueue_head(&self->query_wait); | 1094 | init_waitqueue_head(&self->query_wait); |
1095 | 1095 | ||
1096 | /* Initialise networking socket struct */ | ||
1097 | sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */ | ||
1098 | sk->sk_family = PF_IRDA; | ||
1099 | sk->sk_protocol = protocol; | ||
1100 | |||
1101 | switch (sock->type) { | 1096 | switch (sock->type) { |
1102 | case SOCK_STREAM: | 1097 | case SOCK_STREAM: |
1103 | sock->ops = &irda_stream_ops; | 1098 | sock->ops = &irda_stream_ops; |
@@ -1124,13 +1119,20 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1124 | self->max_sdu_size_rx = TTP_SAR_UNBOUND; | 1119 | self->max_sdu_size_rx = TTP_SAR_UNBOUND; |
1125 | break; | 1120 | break; |
1126 | default: | 1121 | default: |
1122 | sk_free(sk); | ||
1127 | return -ESOCKTNOSUPPORT; | 1123 | return -ESOCKTNOSUPPORT; |
1128 | } | 1124 | } |
1129 | break; | 1125 | break; |
1130 | default: | 1126 | default: |
1127 | sk_free(sk); | ||
1131 | return -ESOCKTNOSUPPORT; | 1128 | return -ESOCKTNOSUPPORT; |
1132 | } | 1129 | } |
1133 | 1130 | ||
1131 | /* Initialise networking socket struct */ | ||
1132 | sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */ | ||
1133 | sk->sk_family = PF_IRDA; | ||
1134 | sk->sk_protocol = protocol; | ||
1135 | |||
1134 | /* Register as a client with IrLMP */ | 1136 | /* Register as a client with IrLMP */ |
1135 | self->ckey = irlmp_register_client(0, NULL, NULL, NULL); | 1137 | self->ckey = irlmp_register_client(0, NULL, NULL, NULL); |
1136 | self->mask.word = 0xffff; | 1138 | self->mask.word = 0xffff; |
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 2e89a00df92c..70907f6baac3 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c | |||
@@ -73,7 +73,8 @@ connlimit_iphash6(const union nf_inet_addr *addr, | |||
73 | static inline bool already_closed(const struct nf_conn *conn) | 73 | static inline bool already_closed(const struct nf_conn *conn) |
74 | { | 74 | { |
75 | if (nf_ct_protonum(conn) == IPPROTO_TCP) | 75 | if (nf_ct_protonum(conn) == IPPROTO_TCP) |
76 | return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT; | 76 | return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT || |
77 | conn->proto.tcp.state == TCP_CONNTRACK_CLOSE; | ||
77 | else | 78 | else |
78 | return 0; | 79 | return 0; |
79 | } | 80 | } |
diff --git a/net/netlink/attr.c b/net/netlink/attr.c index feb326f4a752..47bbf45ae5d7 100644 --- a/net/netlink/attr.c +++ b/net/netlink/attr.c | |||
@@ -400,13 +400,13 @@ void __nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | |||
400 | * @attrlen: length of attribute payload | 400 | * @attrlen: length of attribute payload |
401 | * @data: head of attribute payload | 401 | * @data: head of attribute payload |
402 | * | 402 | * |
403 | * Returns -1 if the tailroom of the skb is insufficient to store | 403 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
404 | * the attribute header and payload. | 404 | * the attribute header and payload. |
405 | */ | 405 | */ |
406 | int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) | 406 | int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) |
407 | { | 407 | { |
408 | if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen))) | 408 | if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen))) |
409 | return -1; | 409 | return -EMSGSIZE; |
410 | 410 | ||
411 | __nla_put(skb, attrtype, attrlen, data); | 411 | __nla_put(skb, attrtype, attrlen, data); |
412 | return 0; | 412 | return 0; |
@@ -418,13 +418,13 @@ int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) | |||
418 | * @attrlen: length of attribute payload | 418 | * @attrlen: length of attribute payload |
419 | * @data: head of attribute payload | 419 | * @data: head of attribute payload |
420 | * | 420 | * |
421 | * Returns -1 if the tailroom of the skb is insufficient to store | 421 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
422 | * the attribute payload. | 422 | * the attribute payload. |
423 | */ | 423 | */ |
424 | int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | 424 | int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) |
425 | { | 425 | { |
426 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) | 426 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) |
427 | return -1; | 427 | return -EMSGSIZE; |
428 | 428 | ||
429 | __nla_put_nohdr(skb, attrlen, data); | 429 | __nla_put_nohdr(skb, attrlen, data); |
430 | return 0; | 430 | return 0; |
@@ -436,13 +436,13 @@ int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) | |||
436 | * @attrlen: length of attribute payload | 436 | * @attrlen: length of attribute payload |
437 | * @data: head of attribute payload | 437 | * @data: head of attribute payload |
438 | * | 438 | * |
439 | * Returns -1 if the tailroom of the skb is insufficient to store | 439 | * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store |
440 | * the attribute payload. | 440 | * the attribute payload. |
441 | */ | 441 | */ |
442 | int nla_append(struct sk_buff *skb, int attrlen, const void *data) | 442 | int nla_append(struct sk_buff *skb, int attrlen, const void *data) |
443 | { | 443 | { |
444 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) | 444 | if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) |
445 | return -1; | 445 | return -EMSGSIZE; |
446 | 446 | ||
447 | memcpy(skb_put(skb, attrlen), data, attrlen); | 447 | memcpy(skb_put(skb, attrlen), data, attrlen); |
448 | return 0; | 448 | return 0; |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index d16929c9b4bc..f5aa23c3e886 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -554,7 +554,8 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, | |||
554 | return genlmsg_end(skb, hdr); | 554 | return genlmsg_end(skb, hdr); |
555 | 555 | ||
556 | nla_put_failure: | 556 | nla_put_failure: |
557 | return genlmsg_cancel(skb, hdr); | 557 | genlmsg_cancel(skb, hdr); |
558 | return -EMSGSIZE; | ||
558 | } | 559 | } |
559 | 560 | ||
560 | static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, | 561 | static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, |
@@ -590,7 +591,8 @@ static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, | |||
590 | return genlmsg_end(skb, hdr); | 591 | return genlmsg_end(skb, hdr); |
591 | 592 | ||
592 | nla_put_failure: | 593 | nla_put_failure: |
593 | return genlmsg_cancel(skb, hdr); | 594 | genlmsg_cancel(skb, hdr); |
595 | return -EMSGSIZE; | ||
594 | } | 596 | } |
595 | 597 | ||
596 | static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) | 598 | static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 0df911fd67b1..64465bacbe79 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -444,7 +444,8 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl, | |||
444 | return nla_nest_end(skb, opts); | 444 | return nla_nest_end(skb, opts); |
445 | 445 | ||
446 | nla_put_failure: | 446 | nla_put_failure: |
447 | return nla_nest_cancel(skb, opts); | 447 | nla_nest_cancel(skb, opts); |
448 | return -EMSGSIZE; | ||
448 | } | 449 | } |
449 | 450 | ||
450 | static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) | 451 | static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) |
@@ -466,7 +467,8 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
466 | return nla_nest_end(skb, opts); | 467 | return nla_nest_end(skb, opts); |
467 | 468 | ||
468 | nla_put_failure: | 469 | nla_put_failure: |
469 | return nla_nest_cancel(skb, opts); | 470 | nla_nest_cancel(skb, opts); |
471 | return -EMSGSIZE; | ||
470 | } | 472 | } |
471 | 473 | ||
472 | static const struct Qdisc_class_ops dsmark_class_ops = { | 474 | static const struct Qdisc_class_ops dsmark_class_ops = { |
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 3a9d226ff1e4..c89fba56db56 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -582,7 +582,8 @@ append_opt: | |||
582 | return nla_nest_end(skb, opts); | 582 | return nla_nest_end(skb, opts); |
583 | 583 | ||
584 | nla_put_failure: | 584 | nla_put_failure: |
585 | return nla_nest_cancel(skb, opts); | 585 | nla_nest_cancel(skb, opts); |
586 | return -EMSGSIZE; | ||
586 | } | 587 | } |
587 | 588 | ||
588 | static void gred_destroy(struct Qdisc *sch) | 589 | static void gred_destroy(struct Qdisc *sch) |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 87293d0db1d7..fdfaa3fcc16d 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1360,7 +1360,7 @@ hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, | |||
1360 | 1360 | ||
1361 | nla_put_failure: | 1361 | nla_put_failure: |
1362 | nla_nest_cancel(skb, nest); | 1362 | nla_nest_cancel(skb, nest); |
1363 | return -1; | 1363 | return -EMSGSIZE; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static int | 1366 | static int |
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index 3dcd493f4f4a..5c569853b9c0 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -281,7 +281,8 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
281 | return nla_nest_end(skb, opts); | 281 | return nla_nest_end(skb, opts); |
282 | 282 | ||
283 | nla_put_failure: | 283 | nla_put_failure: |
284 | return nla_nest_cancel(skb, opts); | 284 | nla_nest_cancel(skb, opts); |
285 | return -EMSGSIZE; | ||
285 | } | 286 | } |
286 | 287 | ||
287 | static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) | 288 | static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2bdd4dddc0e1..fb75f265b39c 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -187,7 +187,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
187 | return genlmsg_end(msg, hdr); | 187 | return genlmsg_end(msg, hdr); |
188 | 188 | ||
189 | nla_put_failure: | 189 | nla_put_failure: |
190 | return genlmsg_cancel(msg, hdr); | 190 | genlmsg_cancel(msg, hdr); |
191 | return -EMSGSIZE; | ||
191 | } | 192 | } |
192 | 193 | ||
193 | static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | 194 | static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) |
@@ -273,7 +274,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
273 | return genlmsg_end(msg, hdr); | 274 | return genlmsg_end(msg, hdr); |
274 | 275 | ||
275 | nla_put_failure: | 276 | nla_put_failure: |
276 | return genlmsg_cancel(msg, hdr); | 277 | genlmsg_cancel(msg, hdr); |
278 | return -EMSGSIZE; | ||
277 | } | 279 | } |
278 | 280 | ||
279 | static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb) | 281 | static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb) |
@@ -928,7 +930,8 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | |||
928 | return genlmsg_end(msg, hdr); | 930 | return genlmsg_end(msg, hdr); |
929 | 931 | ||
930 | nla_put_failure: | 932 | nla_put_failure: |
931 | return genlmsg_cancel(msg, hdr); | 933 | genlmsg_cancel(msg, hdr); |
934 | return -EMSGSIZE; | ||
932 | } | 935 | } |
933 | 936 | ||
934 | static int nl80211_dump_station(struct sk_buff *skb, | 937 | static int nl80211_dump_station(struct sk_buff *skb, |
@@ -1267,7 +1270,8 @@ static int nl80211_send_mpath(struct sk_buff *msg, u32 pid, u32 seq, | |||
1267 | return genlmsg_end(msg, hdr); | 1270 | return genlmsg_end(msg, hdr); |
1268 | 1271 | ||
1269 | nla_put_failure: | 1272 | nla_put_failure: |
1270 | return genlmsg_cancel(msg, hdr); | 1273 | genlmsg_cancel(msg, hdr); |
1274 | return -EMSGSIZE; | ||
1271 | } | 1275 | } |
1272 | 1276 | ||
1273 | static int nl80211_dump_mpath(struct sk_buff *skb, | 1277 | static int nl80211_dump_mpath(struct sk_buff *skb, |
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index ac765dd9c7f5..23a2cc04b8cd 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c | |||
@@ -200,8 +200,8 @@ static struct xfrm_algo_desc aalg_list[] = { | |||
200 | } | 200 | } |
201 | }, | 201 | }, |
202 | { | 202 | { |
203 | .name = "hmac(ripemd160)", | 203 | .name = "hmac(rmd160)", |
204 | .compat = "ripemd160", | 204 | .compat = "rmd160", |
205 | 205 | ||
206 | .uinfo = { | 206 | .uinfo = { |
207 | .auth = { | 207 | .auth = { |