diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-14 10:56:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-14 10:56:24 -0400 |
commit | 533bb8a4d7388686243c37a414c4448ba3566f8a (patch) | |
tree | 506ef946871e4499862ecc8513f49b69389ae865 | |
parent | 4f3f8e94b7b079131f0faf641e8afd790a6537d1 (diff) | |
parent | 159d83363b629c91d020734207c1bc788b96af5a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
[BRIDGE]: Fix crash in __ip_route_output_key with bridge netfilter
[NETFILTER]: ipt_CLUSTERIP: fix race between clusterip_config_find_get and _entry_put
[IPV6] ADDRCONF: Don't generate temporary address for ip6-ip6 interface.
[IPV6] ADDRCONF: Ensure disabling multicast RS even if privacy extensions are disabled.
[IPV6]: Use appropriate sock tclass setting for routing lookup.
[IPV6]: IPv6 extension header structures need to be packed.
[IPV6]: Fix ipv6 address fetching in raw6_icmp_error().
[NET]: Return more appropriate error from eth_validate_addr().
[ISDN]: Do not validate ISDN net device address prior to interface-up
[NET]: Fix kernel-doc for skb_segment
[SOCK] sk_stamp: should be initialized to ktime_set(-1L, 0)
net: check for underlength tap writes
net: make struct tun_struct private to tun.c
[SCTP]: IPv4 vs IPv6 addresses mess in sctp_inet[6]addr_event.
[SCTP]: Fix compiler warning about const qualifiers
[SCTP]: Fix protocol violation when receiving an error lenght INIT-ACK
[SCTP]: Add check for hmac_algo parameter in sctp_verify_param()
[NET_SCHED] cls_u32: refcounting fix for u32_delete()
[DCCP]: Fix skb->cb conflicts with IP
[AX25]: Potential ax25_uid_assoc-s leaks on module unload.
...
40 files changed, 250 insertions, 116 deletions
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index ced83c202cac..ef1a300068dc 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -2010,6 +2010,7 @@ isdn_net_init(struct net_device *ndev) | |||
2010 | ndev->flags = IFF_NOARP|IFF_POINTOPOINT; | 2010 | ndev->flags = IFF_NOARP|IFF_POINTOPOINT; |
2011 | ndev->type = ARPHRD_ETHER; | 2011 | ndev->type = ARPHRD_ETHER; |
2012 | ndev->addr_len = ETH_ALEN; | 2012 | ndev->addr_len = ETH_ALEN; |
2013 | ndev->validate_addr = NULL; | ||
2013 | 2014 | ||
2014 | /* for clients with MPPP maybe higher values better */ | 2015 | /* for clients with MPPP maybe higher values better */ |
2015 | ndev->tx_queue_len = 30; | 2016 | ndev->tx_queue_len = 30; |
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 93b7fb246960..a8d3280923e8 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0089" | 43 | #define DRV_VERSION "EHEA_0090" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
@@ -371,6 +371,7 @@ struct ehea_port_res { | |||
371 | struct ehea_q_skb_arr rq2_skba; | 371 | struct ehea_q_skb_arr rq2_skba; |
372 | struct ehea_q_skb_arr rq3_skba; | 372 | struct ehea_q_skb_arr rq3_skba; |
373 | struct ehea_q_skb_arr sq_skba; | 373 | struct ehea_q_skb_arr sq_skba; |
374 | int sq_skba_size; | ||
374 | spinlock_t netif_queue; | 375 | spinlock_t netif_queue; |
375 | int queue_stopped; | 376 | int queue_stopped; |
376 | int swqe_refill_th; | 377 | int swqe_refill_th; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 07c742dd3f09..f460b623c077 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -349,7 +349,8 @@ static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) | |||
349 | pr->rq1_skba.os_skbs = 0; | 349 | pr->rq1_skba.os_skbs = 0; |
350 | 350 | ||
351 | if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) { | 351 | if (unlikely(test_bit(__EHEA_STOP_XFER, &ehea_driver_flags))) { |
352 | pr->rq1_skba.index = index; | 352 | if (nr_of_wqes > 0) |
353 | pr->rq1_skba.index = index; | ||
353 | pr->rq1_skba.os_skbs = fill_wqes; | 354 | pr->rq1_skba.os_skbs = fill_wqes; |
354 | return; | 355 | return; |
355 | } | 356 | } |
@@ -1464,7 +1465,9 @@ static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr, | |||
1464 | init_attr->act_nr_rwqes_rq2, | 1465 | init_attr->act_nr_rwqes_rq2, |
1465 | init_attr->act_nr_rwqes_rq3); | 1466 | init_attr->act_nr_rwqes_rq3); |
1466 | 1467 | ||
1467 | ret = ehea_init_q_skba(&pr->sq_skba, init_attr->act_nr_send_wqes + 1); | 1468 | pr->sq_skba_size = init_attr->act_nr_send_wqes + 1; |
1469 | |||
1470 | ret = ehea_init_q_skba(&pr->sq_skba, pr->sq_skba_size); | ||
1468 | ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1); | 1471 | ret |= ehea_init_q_skba(&pr->rq1_skba, init_attr->act_nr_rwqes_rq1 + 1); |
1469 | ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1); | 1472 | ret |= ehea_init_q_skba(&pr->rq2_skba, init_attr->act_nr_rwqes_rq2 + 1); |
1470 | ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1); | 1473 | ret |= ehea_init_q_skba(&pr->rq3_skba, init_attr->act_nr_rwqes_rq3 + 1); |
@@ -2621,6 +2624,22 @@ void ehea_purge_sq(struct ehea_qp *orig_qp) | |||
2621 | } | 2624 | } |
2622 | } | 2625 | } |
2623 | 2626 | ||
2627 | void ehea_flush_sq(struct ehea_port *port) | ||
2628 | { | ||
2629 | int i; | ||
2630 | |||
2631 | for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) { | ||
2632 | struct ehea_port_res *pr = &port->port_res[i]; | ||
2633 | int swqe_max = pr->sq_skba_size - 2 - pr->swqe_ll_count; | ||
2634 | int k = 0; | ||
2635 | while (atomic_read(&pr->swqe_avail) < swqe_max) { | ||
2636 | msleep(5); | ||
2637 | if (++k == 20) | ||
2638 | break; | ||
2639 | } | ||
2640 | } | ||
2641 | } | ||
2642 | |||
2624 | int ehea_stop_qps(struct net_device *dev) | 2643 | int ehea_stop_qps(struct net_device *dev) |
2625 | { | 2644 | { |
2626 | struct ehea_port *port = netdev_priv(dev); | 2645 | struct ehea_port *port = netdev_priv(dev); |
@@ -2845,6 +2864,7 @@ static void ehea_rereg_mrs(struct work_struct *work) | |||
2845 | if (dev->flags & IFF_UP) { | 2864 | if (dev->flags & IFF_UP) { |
2846 | down(&port->port_lock); | 2865 | down(&port->port_lock); |
2847 | netif_stop_queue(dev); | 2866 | netif_stop_queue(dev); |
2867 | ehea_flush_sq(port); | ||
2848 | ret = ehea_stop_qps(dev); | 2868 | ret = ehea_stop_qps(dev); |
2849 | if (ret) { | 2869 | if (ret) { |
2850 | up(&port->port_lock); | 2870 | up(&port->port_lock); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 419f533006ab..9f088a47d8b1 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -5316,8 +5316,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5316 | 5316 | ||
5317 | /* check the workaround bit for correct mac address order */ | 5317 | /* check the workaround bit for correct mac address order */ |
5318 | txreg = readl(base + NvRegTransmitPoll); | 5318 | txreg = readl(base + NvRegTransmitPoll); |
5319 | if ((txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) || | 5319 | if (id->driver_data & DEV_HAS_CORRECT_MACADDR) { |
5320 | (id->driver_data & DEV_HAS_CORRECT_MACADDR)) { | ||
5321 | /* mac address is already in correct order */ | 5320 | /* mac address is already in correct order */ |
5322 | dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; | 5321 | dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; |
5323 | dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff; | 5322 | dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff; |
@@ -5325,6 +5324,22 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5325 | dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff; | 5324 | dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff; |
5326 | dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff; | 5325 | dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff; |
5327 | dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff; | 5326 | dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff; |
5327 | } else if (txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) { | ||
5328 | /* mac address is already in correct order */ | ||
5329 | dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; | ||
5330 | dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff; | ||
5331 | dev->dev_addr[2] = (np->orig_mac[0] >> 16) & 0xff; | ||
5332 | dev->dev_addr[3] = (np->orig_mac[0] >> 24) & 0xff; | ||
5333 | dev->dev_addr[4] = (np->orig_mac[1] >> 0) & 0xff; | ||
5334 | dev->dev_addr[5] = (np->orig_mac[1] >> 8) & 0xff; | ||
5335 | /* | ||
5336 | * Set orig mac address back to the reversed version. | ||
5337 | * This flag will be cleared during low power transition. | ||
5338 | * Therefore, we should always put back the reversed address. | ||
5339 | */ | ||
5340 | np->orig_mac[0] = (dev->dev_addr[5] << 0) + (dev->dev_addr[4] << 8) + | ||
5341 | (dev->dev_addr[3] << 16) + (dev->dev_addr[2] << 24); | ||
5342 | np->orig_mac[1] = (dev->dev_addr[1] << 0) + (dev->dev_addr[0] << 8); | ||
5328 | } else { | 5343 | } else { |
5329 | /* need to reverse mac address to correct order */ | 5344 | /* need to reverse mac address to correct order */ |
5330 | dev->dev_addr[0] = (np->orig_mac[1] >> 8) & 0xff; | 5345 | dev->dev_addr[0] = (np->orig_mac[1] >> 8) & 0xff; |
@@ -5595,7 +5610,9 @@ out: | |||
5595 | static int nv_resume(struct pci_dev *pdev) | 5610 | static int nv_resume(struct pci_dev *pdev) |
5596 | { | 5611 | { |
5597 | struct net_device *dev = pci_get_drvdata(pdev); | 5612 | struct net_device *dev = pci_get_drvdata(pdev); |
5613 | u8 __iomem *base = get_hwbase(dev); | ||
5598 | int rc = 0; | 5614 | int rc = 0; |
5615 | u32 txreg; | ||
5599 | 5616 | ||
5600 | if (!netif_running(dev)) | 5617 | if (!netif_running(dev)) |
5601 | goto out; | 5618 | goto out; |
@@ -5606,6 +5623,11 @@ static int nv_resume(struct pci_dev *pdev) | |||
5606 | pci_restore_state(pdev); | 5623 | pci_restore_state(pdev); |
5607 | pci_enable_wake(pdev, PCI_D0, 0); | 5624 | pci_enable_wake(pdev, PCI_D0, 0); |
5608 | 5625 | ||
5626 | /* restore mac address reverse flag */ | ||
5627 | txreg = readl(base + NvRegTransmitPoll); | ||
5628 | txreg |= NVREG_TRANSMITPOLL_MAC_ADDR_REV; | ||
5629 | writel(txreg, base + NvRegTransmitPoll); | ||
5630 | |||
5609 | rc = nv_open(dev); | 5631 | rc = nv_open(dev); |
5610 | out: | 5632 | out: |
5611 | return rc; | 5633 | return rc; |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index af869cf9ae7d..940e2041ba38 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev) | |||
835 | 835 | ||
836 | netif_stop_queue(dev); | 836 | netif_stop_queue(dev); |
837 | netif_carrier_off(dev); | 837 | netif_carrier_off(dev); |
838 | napi_disable(&fep->napi); | 838 | if (fep->fpi->use_napi) |
839 | napi_disable(&fep->napi); | ||
839 | phy_stop(fep->phydev); | 840 | phy_stop(fep->phydev); |
840 | 841 | ||
841 | spin_lock_irqsave(&fep->lock, flags); | 842 | spin_lock_irqsave(&fep->lock, flags); |
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 1d210ed46130..489c7c3b90d9 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -242,12 +242,12 @@ static int macb_mii_init(struct macb *bp) | |||
242 | /* Enable managment port */ | 242 | /* Enable managment port */ |
243 | macb_writel(bp, NCR, MACB_BIT(MPE)); | 243 | macb_writel(bp, NCR, MACB_BIT(MPE)); |
244 | 244 | ||
245 | bp->mii_bus.name = "MACB_mii_bus", | 245 | bp->mii_bus.name = "MACB_mii_bus"; |
246 | bp->mii_bus.read = &macb_mdio_read, | 246 | bp->mii_bus.read = &macb_mdio_read; |
247 | bp->mii_bus.write = &macb_mdio_write, | 247 | bp->mii_bus.write = &macb_mdio_write; |
248 | bp->mii_bus.reset = &macb_mdio_reset, | 248 | bp->mii_bus.reset = &macb_mdio_reset; |
249 | bp->mii_bus.id = bp->pdev->id, | 249 | bp->mii_bus.id = bp->pdev->id; |
250 | bp->mii_bus.priv = bp, | 250 | bp->mii_bus.priv = bp; |
251 | bp->mii_bus.dev = &bp->dev->dev; | 251 | bp->mii_bus.dev = &bp->dev->dev; |
252 | pdata = bp->pdev->dev.platform_data; | 252 | pdata = bp->pdev->dev.platform_data; |
253 | 253 | ||
@@ -1257,6 +1257,8 @@ static int __exit macb_remove(struct platform_device *pdev) | |||
1257 | 1257 | ||
1258 | if (dev) { | 1258 | if (dev) { |
1259 | bp = netdev_priv(dev); | 1259 | bp = netdev_priv(dev); |
1260 | if (bp->phy_dev) | ||
1261 | phy_disconnect(bp->phy_dev); | ||
1260 | mdiobus_unregister(&bp->mii_bus); | 1262 | mdiobus_unregister(&bp->mii_bus); |
1261 | kfree(bp->mii_bus.irq); | 1263 | kfree(bp->mii_bus.irq); |
1262 | unregister_netdev(dev); | 1264 | unregister_netdev(dev); |
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c index 37b42394560d..15fcee55284e 100644 --- a/drivers/net/sc92031.c +++ b/drivers/net/sc92031.c | |||
@@ -1446,6 +1446,7 @@ static int __devinit sc92031_probe(struct pci_dev *pdev, | |||
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | pci_set_drvdata(pdev, dev); | 1448 | pci_set_drvdata(pdev, dev); |
1449 | SET_NETDEV_DEV(dev, &pdev->dev); | ||
1449 | 1450 | ||
1450 | #if SC92031_USE_BAR == 0 | 1451 | #if SC92031_USE_BAR == 0 |
1451 | dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR); | 1452 | dev->mem_start = pci_resource_start(pdev, SC92031_USE_BAR); |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 853bce0ac478..f226bcac7d17 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -154,6 +154,7 @@ static const char *yukon2_name[] = { | |||
154 | "EC", /* 0xb6 */ | 154 | "EC", /* 0xb6 */ |
155 | "FE", /* 0xb7 */ | 155 | "FE", /* 0xb7 */ |
156 | "FE+", /* 0xb8 */ | 156 | "FE+", /* 0xb8 */ |
157 | "Supreme", /* 0xb9 */ | ||
157 | }; | 158 | }; |
158 | 159 | ||
159 | static void sky2_set_multicast(struct net_device *dev); | 160 | static void sky2_set_multicast(struct net_device *dev); |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 4020e9e955b3..63a54e29d563 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1326,9 +1326,11 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id) | |||
1326 | SMC_SET_INT_MASK(mask); | 1326 | SMC_SET_INT_MASK(mask); |
1327 | spin_unlock(&lp->lock); | 1327 | spin_unlock(&lp->lock); |
1328 | 1328 | ||
1329 | #ifndef CONFIG_NET_POLL_CONTROLLER | ||
1329 | if (timeout == MAX_IRQ_LOOPS) | 1330 | if (timeout == MAX_IRQ_LOOPS) |
1330 | PRINTK("%s: spurious interrupt (mask = 0x%02x)\n", | 1331 | PRINTK("%s: spurious interrupt (mask = 0x%02x)\n", |
1331 | dev->name, mask); | 1332 | dev->name, mask); |
1333 | #endif | ||
1332 | DBG(3, "%s: Interrupt done (%d loops)\n", | 1334 | DBG(3, "%s: Interrupt done (%d loops)\n", |
1333 | dev->name, MAX_IRQ_LOOPS - timeout); | 1335 | dev->name, MAX_IRQ_LOOPS - timeout); |
1334 | 1336 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d4655b2d1f3f..96043c5746d0 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.89" | 67 | #define DRV_MODULE_VERSION "3.90" |
68 | #define DRV_MODULE_RELDATE "April 03, 2008" | 68 | #define DRV_MODULE_RELDATE "April 12, 2008" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -12578,7 +12578,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
12578 | const struct pci_device_id *ent) | 12578 | const struct pci_device_id *ent) |
12579 | { | 12579 | { |
12580 | static int tg3_version_printed = 0; | 12580 | static int tg3_version_printed = 0; |
12581 | unsigned long tg3reg_base, tg3reg_len; | 12581 | resource_size_t tg3reg_base; |
12582 | unsigned long tg3reg_len; | ||
12582 | struct net_device *dev; | 12583 | struct net_device *dev; |
12583 | struct tg3 *tp; | 12584 | struct tg3 *tp; |
12584 | int err, pm_cap; | 12585 | int err, pm_cap; |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7b816a032957..5b5d87585d91 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -67,9 +67,42 @@ | |||
67 | #include <asm/system.h> | 67 | #include <asm/system.h> |
68 | #include <asm/uaccess.h> | 68 | #include <asm/uaccess.h> |
69 | 69 | ||
70 | /* Uncomment to enable debugging */ | ||
71 | /* #define TUN_DEBUG 1 */ | ||
72 | |||
70 | #ifdef TUN_DEBUG | 73 | #ifdef TUN_DEBUG |
71 | static int debug; | 74 | static int debug; |
75 | |||
76 | #define DBG if(tun->debug)printk | ||
77 | #define DBG1 if(debug==2)printk | ||
78 | #else | ||
79 | #define DBG( a... ) | ||
80 | #define DBG1( a... ) | ||
81 | #endif | ||
82 | |||
83 | struct tun_struct { | ||
84 | struct list_head list; | ||
85 | unsigned long flags; | ||
86 | int attached; | ||
87 | uid_t owner; | ||
88 | gid_t group; | ||
89 | |||
90 | wait_queue_head_t read_wait; | ||
91 | struct sk_buff_head readq; | ||
92 | |||
93 | struct net_device *dev; | ||
94 | |||
95 | struct fasync_struct *fasync; | ||
96 | |||
97 | unsigned long if_flags; | ||
98 | u8 dev_addr[ETH_ALEN]; | ||
99 | u32 chr_filter[2]; | ||
100 | u32 net_filter[2]; | ||
101 | |||
102 | #ifdef TUN_DEBUG | ||
103 | int debug; | ||
72 | #endif | 104 | #endif |
105 | }; | ||
73 | 106 | ||
74 | /* Network device part of the driver */ | 107 | /* Network device part of the driver */ |
75 | 108 | ||
@@ -253,8 +286,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, | |||
253 | return -EFAULT; | 286 | return -EFAULT; |
254 | } | 287 | } |
255 | 288 | ||
256 | if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) | 289 | if ((tun->flags & TUN_TYPE_MASK) == TUN_TAP_DEV) { |
257 | align = NET_IP_ALIGN; | 290 | align = NET_IP_ALIGN; |
291 | if (unlikely(len < ETH_HLEN)) | ||
292 | return -EINVAL; | ||
293 | } | ||
258 | 294 | ||
259 | if (!(skb = alloc_skb(len + align, GFP_KERNEL))) { | 295 | if (!(skb = alloc_skb(len + align, GFP_KERNEL))) { |
260 | tun->dev->stats.rx_dropped++; | 296 | tun->dev->stats.rx_dropped++; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 8cc316653a39..0ee4c168e4c0 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3833,6 +3833,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3833 | struct device_node *phy; | 3833 | struct device_node *phy; |
3834 | int err, ucc_num, max_speed = 0; | 3834 | int err, ucc_num, max_speed = 0; |
3835 | const phandle *ph; | 3835 | const phandle *ph; |
3836 | const u32 *fixed_link; | ||
3836 | const unsigned int *prop; | 3837 | const unsigned int *prop; |
3837 | const char *sprop; | 3838 | const char *sprop; |
3838 | const void *mac_addr; | 3839 | const void *mac_addr; |
@@ -3923,18 +3924,38 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3923 | 3924 | ||
3924 | ug_info->uf_info.regs = res.start; | 3925 | ug_info->uf_info.regs = res.start; |
3925 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); | 3926 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); |
3927 | fixed_link = of_get_property(np, "fixed-link", NULL); | ||
3928 | if (fixed_link) { | ||
3929 | ug_info->mdio_bus = 0; | ||
3930 | ug_info->phy_address = fixed_link[0]; | ||
3931 | phy = NULL; | ||
3932 | } else { | ||
3933 | ph = of_get_property(np, "phy-handle", NULL); | ||
3934 | phy = of_find_node_by_phandle(*ph); | ||
3926 | 3935 | ||
3927 | ph = of_get_property(np, "phy-handle", NULL); | 3936 | if (phy == NULL) |
3928 | phy = of_find_node_by_phandle(*ph); | 3937 | return -ENODEV; |
3929 | 3938 | ||
3930 | if (phy == NULL) | 3939 | /* set the PHY address */ |
3931 | return -ENODEV; | 3940 | prop = of_get_property(phy, "reg", NULL); |
3941 | if (prop == NULL) | ||
3942 | return -1; | ||
3943 | ug_info->phy_address = *prop; | ||
3944 | |||
3945 | /* Set the bus id */ | ||
3946 | mdio = of_get_parent(phy); | ||
3947 | |||
3948 | if (mdio == NULL) | ||
3949 | return -1; | ||
3932 | 3950 | ||
3933 | /* set the PHY address */ | 3951 | err = of_address_to_resource(mdio, 0, &res); |
3934 | prop = of_get_property(phy, "reg", NULL); | 3952 | of_node_put(mdio); |
3935 | if (prop == NULL) | 3953 | |
3936 | return -1; | 3954 | if (err) |
3937 | ug_info->phy_address = *prop; | 3955 | return -1; |
3956 | |||
3957 | ug_info->mdio_bus = res.start; | ||
3958 | } | ||
3938 | 3959 | ||
3939 | /* get the phy interface type, or default to MII */ | 3960 | /* get the phy interface type, or default to MII */ |
3940 | prop = of_get_property(np, "phy-connection-type", NULL); | 3961 | prop = of_get_property(np, "phy-connection-type", NULL); |
@@ -3979,20 +4000,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3979 | ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4; | 4000 | ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4; |
3980 | } | 4001 | } |
3981 | 4002 | ||
3982 | /* Set the bus id */ | ||
3983 | mdio = of_get_parent(phy); | ||
3984 | |||
3985 | if (mdio == NULL) | ||
3986 | return -1; | ||
3987 | |||
3988 | err = of_address_to_resource(mdio, 0, &res); | ||
3989 | of_node_put(mdio); | ||
3990 | |||
3991 | if (err) | ||
3992 | return -1; | ||
3993 | |||
3994 | ug_info->mdio_bus = res.start; | ||
3995 | |||
3996 | if (netif_msg_probe(&debug)) | 4003 | if (netif_msg_probe(&debug)) |
3997 | printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d) \n", | 4004 | printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d) \n", |
3998 | ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs, | 4005 | ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs, |
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index a3df09ee729f..8005dd16fb4e 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig | |||
@@ -150,9 +150,13 @@ config HDLC_FR | |||
150 | 150 | ||
151 | config HDLC_PPP | 151 | config HDLC_PPP |
152 | tristate "Synchronous Point-to-Point Protocol (PPP) support" | 152 | tristate "Synchronous Point-to-Point Protocol (PPP) support" |
153 | depends on HDLC | 153 | depends on HDLC && BROKEN |
154 | help | 154 | help |
155 | Generic HDLC driver supporting PPP over WAN connections. | 155 | Generic HDLC driver supporting PPP over WAN connections. |
156 | This module is currently broken and will cause a kernel panic | ||
157 | when a device configured in PPP mode is activated. | ||
158 | |||
159 | It will be replaced by new PPP implementation in Linux 2.6.26. | ||
156 | 160 | ||
157 | If unsure, say N. | 161 | If unsure, say N. |
158 | 162 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 9cdd12a9e843..cedbbd806bf6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -86,6 +86,7 @@ header-y += if_plip.h | |||
86 | header-y += if_ppp.h | 86 | header-y += if_ppp.h |
87 | header-y += if_slip.h | 87 | header-y += if_slip.h |
88 | header-y += if_strip.h | 88 | header-y += if_strip.h |
89 | header-y += if_tun.h | ||
89 | header-y += if_tunnel.h | 90 | header-y += if_tunnel.h |
90 | header-y += in6.h | 91 | header-y += in6.h |
91 | header-y += in_route.h | 92 | header-y += in_route.h |
@@ -229,7 +230,6 @@ unifdef-y += if_link.h | |||
229 | unifdef-y += if_pppol2tp.h | 230 | unifdef-y += if_pppol2tp.h |
230 | unifdef-y += if_pppox.h | 231 | unifdef-y += if_pppox.h |
231 | unifdef-y += if_tr.h | 232 | unifdef-y += if_tr.h |
232 | unifdef-y += if_tun.h | ||
233 | unifdef-y += if_vlan.h | 233 | unifdef-y += if_vlan.h |
234 | unifdef-y += if_wanpipe.h | 234 | unifdef-y += if_wanpipe.h |
235 | unifdef-y += igmp.h | 235 | unifdef-y += igmp.h |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 72f1c5f47be3..8c71fe2fb1f5 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -18,47 +18,8 @@ | |||
18 | #ifndef __IF_TUN_H | 18 | #ifndef __IF_TUN_H |
19 | #define __IF_TUN_H | 19 | #define __IF_TUN_H |
20 | 20 | ||
21 | /* Uncomment to enable debugging */ | ||
22 | /* #define TUN_DEBUG 1 */ | ||
23 | |||
24 | #include <linux/types.h> | 21 | #include <linux/types.h> |
25 | 22 | ||
26 | #ifdef __KERNEL__ | ||
27 | |||
28 | #ifdef TUN_DEBUG | ||
29 | #define DBG if(tun->debug)printk | ||
30 | #define DBG1 if(debug==2)printk | ||
31 | #else | ||
32 | #define DBG( a... ) | ||
33 | #define DBG1( a... ) | ||
34 | #endif | ||
35 | |||
36 | struct tun_struct { | ||
37 | struct list_head list; | ||
38 | unsigned long flags; | ||
39 | int attached; | ||
40 | uid_t owner; | ||
41 | gid_t group; | ||
42 | |||
43 | wait_queue_head_t read_wait; | ||
44 | struct sk_buff_head readq; | ||
45 | |||
46 | struct net_device *dev; | ||
47 | |||
48 | struct fasync_struct *fasync; | ||
49 | |||
50 | unsigned long if_flags; | ||
51 | u8 dev_addr[ETH_ALEN]; | ||
52 | u32 chr_filter[2]; | ||
53 | u32 net_filter[2]; | ||
54 | |||
55 | #ifdef TUN_DEBUG | ||
56 | int debug; | ||
57 | #endif | ||
58 | }; | ||
59 | |||
60 | #endif /* __KERNEL__ */ | ||
61 | |||
62 | /* Read queue size */ | 23 | /* Read queue size */ |
63 | #define TUN_READQ_SIZE 500 | 24 | #define TUN_READQ_SIZE 500 |
64 | 25 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 4aaefc349a4b..134c8e5cf07c 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -53,7 +53,7 @@ struct ipv6_opt_hdr { | |||
53 | /* | 53 | /* |
54 | * TLV encoded option data follows. | 54 | * TLV encoded option data follows. |
55 | */ | 55 | */ |
56 | }; | 56 | } __attribute__ ((packed)); /* required for some archs */ |
57 | 57 | ||
58 | #define ipv6_destopt_hdr ipv6_opt_hdr | 58 | #define ipv6_destopt_hdr ipv6_opt_hdr |
59 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 59 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index ba33db053854..7040a782c656 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h | |||
@@ -47,7 +47,7 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) | |||
47 | } while (0) | 47 | } while (0) |
48 | 48 | ||
49 | #define IP6_ECN_flow_xmit(sk, label) do { \ | 49 | #define IP6_ECN_flow_xmit(sk, label) do { \ |
50 | if (INET_ECN_is_capable(inet_sk(sk)->tos)) \ | 50 | if (INET_ECN_is_capable(inet6_sk(sk)->tclass)) \ |
51 | (label) |= htonl(INET_ECN_ECT_0 << 20); \ | 51 | (label) |= htonl(INET_ECN_ECT_0 << 20); \ |
52 | } while (0) | 52 | } while (0) |
53 | 53 | ||
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 10ae2da6f93b..35b1e83fb96a 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -104,6 +104,7 @@ typedef enum { | |||
104 | SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ | 104 | SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ |
105 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ | 105 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ |
106 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ | 106 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ |
107 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ | ||
107 | SCTP_CMD_LAST | 108 | SCTP_CMD_LAST |
108 | } sctp_verb_t; | 109 | } sctp_verb_t; |
109 | 110 | ||
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 9bcfc12275e8..7ea12e8e6676 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -67,7 +67,7 @@ struct sctp_ulpevent { | |||
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* Retrieve the skb this event sits inside of. */ | 69 | /* Retrieve the skb this event sits inside of. */ |
70 | static inline struct sk_buff *sctp_event2skb(struct sctp_ulpevent *ev) | 70 | static inline struct sk_buff *sctp_event2skb(const struct sctp_ulpevent *ev) |
71 | { | 71 | { |
72 | return container_of((void *)ev, struct sk_buff, cb); | 72 | return container_of((void *)ev, struct sk_buff, cb); |
73 | } | 73 | } |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 5f4eb73fb9d3..57aeba729bae 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -218,9 +218,11 @@ void __exit ax25_uid_free(void) | |||
218 | struct hlist_node *node; | 218 | struct hlist_node *node; |
219 | 219 | ||
220 | write_lock(&ax25_uid_lock); | 220 | write_lock(&ax25_uid_lock); |
221 | again: | ||
221 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { | 222 | ax25_uid_for_each(ax25_uid, node, &ax25_uid_list) { |
222 | hlist_del_init(&ax25_uid->uid_node); | 223 | hlist_del_init(&ax25_uid->uid_node); |
223 | ax25_uid_put(ax25_uid); | 224 | ax25_uid_put(ax25_uid); |
225 | goto again; | ||
224 | } | 226 | } |
225 | write_unlock(&ax25_uid_lock); | 227 | write_unlock(&ax25_uid_lock); |
226 | } | 228 | } |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 1c0efd8ad9f3..af7e8be8d8d2 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -110,7 +110,8 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb) | |||
110 | * ipt_REJECT needs it. Future netfilter modules might | 110 | * ipt_REJECT needs it. Future netfilter modules might |
111 | * require us to fill additional fields. */ | 111 | * require us to fill additional fields. */ |
112 | static struct net_device __fake_net_device = { | 112 | static struct net_device __fake_net_device = { |
113 | .hard_header_len = ETH_HLEN | 113 | .hard_header_len = ETH_HLEN, |
114 | .nd_net = &init_net, | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | static struct rtable __fake_rtable = { | 117 | static struct rtable __fake_rtable = { |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 0d0fd28a9041..608701339620 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2131,8 +2131,8 @@ EXPORT_SYMBOL_GPL(skb_pull_rcsum); | |||
2131 | * @features: features for the output path (see dev->features) | 2131 | * @features: features for the output path (see dev->features) |
2132 | * | 2132 | * |
2133 | * This function performs segmentation on the given skb. It returns | 2133 | * This function performs segmentation on the given skb. It returns |
2134 | * the segment at the given position. It returns NULL if there are | 2134 | * a pointer to the first in a list of new skbs for the segments. |
2135 | * no more segments to generate, or when an error is encountered. | 2135 | * In case of error it returns ERR_PTR(err). |
2136 | */ | 2136 | */ |
2137 | struct sk_buff *skb_segment(struct sk_buff *skb, int features) | 2137 | struct sk_buff *skb_segment(struct sk_buff *skb, int features) |
2138 | { | 2138 | { |
diff --git a/net/core/sock.c b/net/core/sock.c index 2654c147c004..7a0567b4b2c9 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1725,7 +1725,7 @@ void sock_init_data(struct socket *sock, struct sock *sk) | |||
1725 | sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; | 1725 | sk->sk_rcvtimeo = MAX_SCHEDULE_TIMEOUT; |
1726 | sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; | 1726 | sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; |
1727 | 1727 | ||
1728 | sk->sk_stamp = ktime_set(-1L, -1L); | 1728 | sk->sk_stamp = ktime_set(-1L, 0); |
1729 | 1729 | ||
1730 | atomic_set(&sk->sk_refcnt, 1); | 1730 | atomic_set(&sk->sk_refcnt, 1); |
1731 | atomic_set(&sk->sk_drops, 0); | 1731 | atomic_set(&sk->sk_drops, 0); |
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 287a62bc2e0f..ba2ef94a2302 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
@@ -325,6 +325,12 @@ static inline int dccp_bad_service_code(const struct sock *sk, | |||
325 | * This is used for transmission as well as for reception. | 325 | * This is used for transmission as well as for reception. |
326 | */ | 326 | */ |
327 | struct dccp_skb_cb { | 327 | struct dccp_skb_cb { |
328 | union { | ||
329 | struct inet_skb_parm h4; | ||
330 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | ||
331 | struct inet6_skb_parm h6; | ||
332 | #endif | ||
333 | } header; | ||
328 | __u8 dccpd_type:4; | 334 | __u8 dccpd_type:4; |
329 | __u8 dccpd_ccval:4; | 335 | __u8 dccpd_ccval:4; |
330 | __u8 dccpd_reset_code, | 336 | __u8 dccpd_reset_code, |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 474075adbde4..b33704415555 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -489,7 +489,6 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req, | |||
489 | 489 | ||
490 | dh->dccph_checksum = dccp_v4_csum_finish(skb, ireq->loc_addr, | 490 | dh->dccph_checksum = dccp_v4_csum_finish(skb, ireq->loc_addr, |
491 | ireq->rmt_addr); | 491 | ireq->rmt_addr); |
492 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | ||
493 | err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, | 492 | err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, |
494 | ireq->rmt_addr, | 493 | ireq->rmt_addr, |
495 | ireq->opt); | 494 | ireq->opt); |
diff --git a/net/dccp/output.c b/net/dccp/output.c index 3b763db3d863..3d7d628d870d 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -126,7 +126,6 @@ static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) | |||
126 | 126 | ||
127 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); | 127 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); |
128 | 128 | ||
129 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | ||
130 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); | 129 | err = icsk->icsk_af_ops->queue_xmit(skb, 0); |
131 | return net_xmit_eval(err); | 130 | return net_xmit_eval(err); |
132 | } | 131 | } |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index e3f5d37b84be..c91d3c1fd30d 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1057,6 +1057,9 @@ static int __init dccp_init(void) | |||
1057 | int ehash_order, bhash_order, i; | 1057 | int ehash_order, bhash_order, i; |
1058 | int rc = -ENOBUFS; | 1058 | int rc = -ENOBUFS; |
1059 | 1059 | ||
1060 | BUILD_BUG_ON(sizeof(struct dccp_skb_cb) > | ||
1061 | FIELD_SIZEOF(struct sk_buff, cb)); | ||
1062 | |||
1060 | dccp_hashinfo.bind_bucket_cachep = | 1063 | dccp_hashinfo.bind_bucket_cachep = |
1061 | kmem_cache_create("dccp_bind_bucket", | 1064 | kmem_cache_create("dccp_bind_bucket", |
1062 | sizeof(struct inet_bind_bucket), 0, | 1065 | sizeof(struct inet_bind_bucket), 0, |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index a7b417523e9b..a80839b02e3f 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -301,7 +301,7 @@ static int eth_change_mtu(struct net_device *dev, int new_mtu) | |||
301 | static int eth_validate_addr(struct net_device *dev) | 301 | static int eth_validate_addr(struct net_device *dev) |
302 | { | 302 | { |
303 | if (!is_valid_ether_addr(dev->dev_addr)) | 303 | if (!is_valid_ether_addr(dev->dev_addr)) |
304 | return -EINVAL; | 304 | return -EADDRNOTAVAIL; |
305 | 305 | ||
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 52926c8e3cc1..a12dd329e208 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -82,8 +82,8 @@ clusterip_config_put(struct clusterip_config *c) | |||
82 | static inline void | 82 | static inline void |
83 | clusterip_config_entry_put(struct clusterip_config *c) | 83 | clusterip_config_entry_put(struct clusterip_config *c) |
84 | { | 84 | { |
85 | write_lock_bh(&clusterip_lock); | ||
85 | if (atomic_dec_and_test(&c->entries)) { | 86 | if (atomic_dec_and_test(&c->entries)) { |
86 | write_lock_bh(&clusterip_lock); | ||
87 | list_del(&c->list); | 87 | list_del(&c->list); |
88 | write_unlock_bh(&clusterip_lock); | 88 | write_unlock_bh(&clusterip_lock); |
89 | 89 | ||
@@ -96,7 +96,9 @@ clusterip_config_entry_put(struct clusterip_config *c) | |||
96 | #ifdef CONFIG_PROC_FS | 96 | #ifdef CONFIG_PROC_FS |
97 | remove_proc_entry(c->pde->name, c->pde->parent); | 97 | remove_proc_entry(c->pde->name, c->pde->parent); |
98 | #endif | 98 | #endif |
99 | return; | ||
99 | } | 100 | } |
101 | write_unlock_bh(&clusterip_lock); | ||
100 | } | 102 | } |
101 | 103 | ||
102 | static struct clusterip_config * | 104 | static struct clusterip_config * |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a65935a9afd9..e08955baedff 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -371,25 +371,26 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) | |||
371 | */ | 371 | */ |
372 | in6_dev_hold(ndev); | 372 | in6_dev_hold(ndev); |
373 | 373 | ||
374 | #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) | ||
375 | if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { | ||
376 | printk(KERN_INFO | ||
377 | "%s: Disabled Multicast RS\n", | ||
378 | dev->name); | ||
379 | ndev->cnf.rtr_solicits = 0; | ||
380 | } | ||
381 | #endif | ||
382 | |||
374 | #ifdef CONFIG_IPV6_PRIVACY | 383 | #ifdef CONFIG_IPV6_PRIVACY |
375 | setup_timer(&ndev->regen_timer, ipv6_regen_rndid, (unsigned long)ndev); | 384 | setup_timer(&ndev->regen_timer, ipv6_regen_rndid, (unsigned long)ndev); |
376 | if ((dev->flags&IFF_LOOPBACK) || | 385 | if ((dev->flags&IFF_LOOPBACK) || |
377 | dev->type == ARPHRD_TUNNEL || | 386 | dev->type == ARPHRD_TUNNEL || |
378 | #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) | 387 | dev->type == ARPHRD_TUNNEL6 || |
379 | dev->type == ARPHRD_SIT || | 388 | dev->type == ARPHRD_SIT || |
380 | #endif | ||
381 | dev->type == ARPHRD_NONE) { | 389 | dev->type == ARPHRD_NONE) { |
382 | printk(KERN_INFO | 390 | printk(KERN_INFO |
383 | "%s: Disabled Privacy Extensions\n", | 391 | "%s: Disabled Privacy Extensions\n", |
384 | dev->name); | 392 | dev->name); |
385 | ndev->cnf.use_tempaddr = -1; | 393 | ndev->cnf.use_tempaddr = -1; |
386 | |||
387 | if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { | ||
388 | printk(KERN_INFO | ||
389 | "%s: Disabled Multicast RS\n", | ||
390 | dev->name); | ||
391 | ndev->cnf.rtr_solicits = 0; | ||
392 | } | ||
393 | } else { | 394 | } else { |
394 | in6_dev_hold(ndev); | 395 | in6_dev_hold(ndev); |
395 | ipv6_regen_rndid((unsigned long) ndev); | 396 | ipv6_regen_rndid((unsigned long) ndev); |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 8897ccf8086a..0a6fbc1d1a50 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -372,8 +372,10 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, | |||
372 | read_lock(&raw_v6_hashinfo.lock); | 372 | read_lock(&raw_v6_hashinfo.lock); |
373 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); | 373 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); |
374 | if (sk != NULL) { | 374 | if (sk != NULL) { |
375 | saddr = &ipv6_hdr(skb)->saddr; | 375 | struct ipv6hdr *hdr = (struct ipv6hdr *) skb->data; |
376 | daddr = &ipv6_hdr(skb)->daddr; | 376 | |
377 | saddr = &hdr->saddr; | ||
378 | daddr = &hdr->daddr; | ||
377 | net = skb->dev->nd_net; | 379 | net = skb->dev->nd_net; |
378 | 380 | ||
379 | while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, | 381 | while ((sk = __raw_v6_lookup(net, sk, nexthdr, saddr, daddr, |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index c5c16b4b6e98..4d755444c449 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -411,8 +411,10 @@ static void u32_destroy(struct tcf_proto *tp) | |||
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
414 | for (ht=tp_c->hlist; ht; ht = ht->next) | 414 | for (ht = tp_c->hlist; ht; ht = ht->next) { |
415 | ht->refcnt--; | ||
415 | u32_clear_hnode(tp, ht); | 416 | u32_clear_hnode(tp, ht); |
417 | } | ||
416 | 418 | ||
417 | while ((ht = tp_c->hlist) != NULL) { | 419 | while ((ht = tp_c->hlist) != NULL) { |
418 | tp_c->hlist = ht->next; | 420 | tp_c->hlist = ht->next; |
@@ -441,8 +443,12 @@ static int u32_delete(struct tcf_proto *tp, unsigned long arg) | |||
441 | if (tp->root == ht) | 443 | if (tp->root == ht) |
442 | return -EINVAL; | 444 | return -EINVAL; |
443 | 445 | ||
444 | if (--ht->refcnt == 0) | 446 | if (ht->refcnt == 1) { |
447 | ht->refcnt--; | ||
445 | u32_destroy_hnode(tp, ht); | 448 | u32_destroy_hnode(tp, ht); |
449 | } else { | ||
450 | return -EBUSY; | ||
451 | } | ||
446 | 452 | ||
447 | return 0; | 453 | return 0; |
448 | } | 454 | } |
@@ -568,7 +574,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
568 | if (ht == NULL) | 574 | if (ht == NULL) |
569 | return -ENOBUFS; | 575 | return -ENOBUFS; |
570 | ht->tp_c = tp_c; | 576 | ht->tp_c = tp_c; |
571 | ht->refcnt = 0; | 577 | ht->refcnt = 1; |
572 | ht->divisor = divisor; | 578 | ht->divisor = divisor; |
573 | ht->handle = handle; | 579 | ht->handle = handle; |
574 | ht->prio = tp->prio; | 580 | ht->prio = tp->prio; |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index b1e05d719f9b..85f1495e0edc 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -110,8 +110,9 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, | |||
110 | spin_lock_bh(&sctp_local_addr_lock); | 110 | spin_lock_bh(&sctp_local_addr_lock); |
111 | list_for_each_entry_safe(addr, temp, | 111 | list_for_each_entry_safe(addr, temp, |
112 | &sctp_local_addr_list, list) { | 112 | &sctp_local_addr_list, list) { |
113 | if (ipv6_addr_equal(&addr->a.v6.sin6_addr, | 113 | if (addr->a.sa.sa_family == AF_INET6 && |
114 | &ifa->addr)) { | 114 | ipv6_addr_equal(&addr->a.v6.sin6_addr, |
115 | &ifa->addr)) { | ||
115 | found = 1; | 116 | found = 1; |
116 | addr->valid = 0; | 117 | addr->valid = 0; |
117 | list_del_rcu(&addr->list); | 118 | list_del_rcu(&addr->list); |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 1bb3c5c35d2a..c0714469233c 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -793,6 +793,9 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout) | |||
793 | break; | 793 | break; |
794 | 794 | ||
795 | case SCTP_CID_ABORT: | 795 | case SCTP_CID_ABORT: |
796 | if (sctp_test_T_bit(chunk)) { | ||
797 | packet->vtag = asoc->c.my_vtag; | ||
798 | } | ||
796 | case SCTP_CID_SACK: | 799 | case SCTP_CID_SACK: |
797 | case SCTP_CID_HEARTBEAT: | 800 | case SCTP_CID_HEARTBEAT: |
798 | case SCTP_CID_HEARTBEAT_ACK: | 801 | case SCTP_CID_HEARTBEAT_ACK: |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index f90091a1b9ce..c2dd65d9f38d 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -647,7 +647,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
647 | spin_lock_bh(&sctp_local_addr_lock); | 647 | spin_lock_bh(&sctp_local_addr_lock); |
648 | list_for_each_entry_safe(addr, temp, | 648 | list_for_each_entry_safe(addr, temp, |
649 | &sctp_local_addr_list, list) { | 649 | &sctp_local_addr_list, list) { |
650 | if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { | 650 | if (addr->a.sa.sa_family == AF_INET && |
651 | addr->a.v4.sin_addr.s_addr == | ||
652 | ifa->ifa_local) { | ||
651 | found = 1; | 653 | found = 1; |
652 | addr->valid = 0; | 654 | addr->valid = 0; |
653 | list_del_rcu(&addr->list); | 655 | list_del_rcu(&addr->list); |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 578630e8e00d..36ebb392472e 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1982,7 +1982,10 @@ static sctp_ierror_t sctp_verify_param(const struct sctp_association *asoc, | |||
1982 | struct sctp_chunk *chunk, | 1982 | struct sctp_chunk *chunk, |
1983 | struct sctp_chunk **err_chunk) | 1983 | struct sctp_chunk **err_chunk) |
1984 | { | 1984 | { |
1985 | struct sctp_hmac_algo_param *hmacs; | ||
1985 | int retval = SCTP_IERROR_NO_ERROR; | 1986 | int retval = SCTP_IERROR_NO_ERROR; |
1987 | __u16 n_elt, id = 0; | ||
1988 | int i; | ||
1986 | 1989 | ||
1987 | /* FIXME - This routine is not looking at each parameter per the | 1990 | /* FIXME - This routine is not looking at each parameter per the |
1988 | * chunk type, i.e., unrecognized parameters should be further | 1991 | * chunk type, i.e., unrecognized parameters should be further |
@@ -2056,9 +2059,29 @@ static sctp_ierror_t sctp_verify_param(const struct sctp_association *asoc, | |||
2056 | break; | 2059 | break; |
2057 | 2060 | ||
2058 | case SCTP_PARAM_HMAC_ALGO: | 2061 | case SCTP_PARAM_HMAC_ALGO: |
2059 | if (sctp_auth_enable) | 2062 | if (!sctp_auth_enable) |
2060 | break; | 2063 | goto fallthrough; |
2061 | /* Fall Through */ | 2064 | |
2065 | hmacs = (struct sctp_hmac_algo_param *)param.p; | ||
2066 | n_elt = (ntohs(param.p->length) - sizeof(sctp_paramhdr_t)) >> 1; | ||
2067 | |||
2068 | /* SCTP-AUTH: Section 6.1 | ||
2069 | * The HMAC algorithm based on SHA-1 MUST be supported and | ||
2070 | * included in the HMAC-ALGO parameter. | ||
2071 | */ | ||
2072 | for (i = 0; i < n_elt; i++) { | ||
2073 | id = ntohs(hmacs->hmac_ids[i]); | ||
2074 | |||
2075 | if (id == SCTP_AUTH_HMAC_ID_SHA1) | ||
2076 | break; | ||
2077 | } | ||
2078 | |||
2079 | if (id != SCTP_AUTH_HMAC_ID_SHA1) { | ||
2080 | sctp_process_inv_paramlength(asoc, param.p, chunk, | ||
2081 | err_chunk); | ||
2082 | retval = SCTP_IERROR_ABORT; | ||
2083 | } | ||
2084 | break; | ||
2062 | fallthrough: | 2085 | fallthrough: |
2063 | default: | 2086 | default: |
2064 | SCTP_DEBUG_PRINTK("Unrecognized param: %d for chunk %d.\n", | 2087 | SCTP_DEBUG_PRINTK("Unrecognized param: %d for chunk %d.\n", |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 28eb38eb6083..a4763fd24fd8 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -1536,6 +1536,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1536 | error = sctp_auth_asoc_init_active_key(asoc, | 1536 | error = sctp_auth_asoc_init_active_key(asoc, |
1537 | GFP_ATOMIC); | 1537 | GFP_ATOMIC); |
1538 | break; | 1538 | break; |
1539 | case SCTP_CMD_UPDATE_INITTAG: | ||
1540 | asoc->peer.i.init_tag = cmd->obj.u32; | ||
1541 | break; | ||
1539 | 1542 | ||
1540 | default: | 1543 | default: |
1541 | printk(KERN_WARNING "Impossible command: %u, %p\n", | 1544 | printk(KERN_WARNING "Impossible command: %u, %p\n", |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index f2ed6473feef..07194c2a32df 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -4144,6 +4144,24 @@ static sctp_disposition_t sctp_sf_abort_violation( | |||
4144 | goto nomem; | 4144 | goto nomem; |
4145 | 4145 | ||
4146 | if (asoc) { | 4146 | if (asoc) { |
4147 | /* Treat INIT-ACK as a special case during COOKIE-WAIT. */ | ||
4148 | if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK && | ||
4149 | !asoc->peer.i.init_tag) { | ||
4150 | sctp_initack_chunk_t *initack; | ||
4151 | |||
4152 | initack = (sctp_initack_chunk_t *)chunk->chunk_hdr; | ||
4153 | if (!sctp_chunk_length_valid(chunk, | ||
4154 | sizeof(sctp_initack_chunk_t))) | ||
4155 | abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T; | ||
4156 | else { | ||
4157 | unsigned int inittag; | ||
4158 | |||
4159 | inittag = ntohl(initack->init_hdr.init_tag); | ||
4160 | sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_INITTAG, | ||
4161 | SCTP_U32(inittag)); | ||
4162 | } | ||
4163 | } | ||
4164 | |||
4147 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); | 4165 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); |
4148 | SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); | 4166 | SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); |
4149 | 4167 | ||
@@ -4349,6 +4367,7 @@ sctp_disposition_t sctp_sf_do_prm_asoc(const struct sctp_endpoint *ep, | |||
4349 | sctp_cmd_seq_t *commands) | 4367 | sctp_cmd_seq_t *commands) |
4350 | { | 4368 | { |
4351 | struct sctp_chunk *repl; | 4369 | struct sctp_chunk *repl; |
4370 | struct sctp_association* my_asoc; | ||
4352 | 4371 | ||
4353 | /* The comment below says that we enter COOKIE-WAIT AFTER | 4372 | /* The comment below says that we enter COOKIE-WAIT AFTER |
4354 | * sending the INIT, but that doesn't actually work in our | 4373 | * sending the INIT, but that doesn't actually work in our |
@@ -4372,8 +4391,8 @@ sctp_disposition_t sctp_sf_do_prm_asoc(const struct sctp_endpoint *ep, | |||
4372 | /* Cast away the const modifier, as we want to just | 4391 | /* Cast away the const modifier, as we want to just |
4373 | * rerun it through as a sideffect. | 4392 | * rerun it through as a sideffect. |
4374 | */ | 4393 | */ |
4375 | sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, | 4394 | my_asoc = (struct sctp_association *)asoc; |
4376 | SCTP_ASOC((struct sctp_association *) asoc)); | 4395 | sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(my_asoc)); |
4377 | 4396 | ||
4378 | /* Choose transport for INIT. */ | 4397 | /* Choose transport for INIT. */ |
4379 | sctp_add_cmd_sf(commands, SCTP_CMD_INIT_CHOOSE_TRANSPORT, | 4398 | sctp_add_cmd_sf(commands, SCTP_CMD_INIT_CHOOSE_TRANSPORT, |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d994d822900d..998e63a31311 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -5868,11 +5868,12 @@ SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *msg, | |||
5868 | sctp_cmsgs_t *cmsgs) | 5868 | sctp_cmsgs_t *cmsgs) |
5869 | { | 5869 | { |
5870 | struct cmsghdr *cmsg; | 5870 | struct cmsghdr *cmsg; |
5871 | struct msghdr *my_msg = (struct msghdr *)msg; | ||
5871 | 5872 | ||
5872 | for (cmsg = CMSG_FIRSTHDR(msg); | 5873 | for (cmsg = CMSG_FIRSTHDR(msg); |
5873 | cmsg != NULL; | 5874 | cmsg != NULL; |
5874 | cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) { | 5875 | cmsg = CMSG_NXTHDR(my_msg, cmsg)) { |
5875 | if (!CMSG_OK(msg, cmsg)) | 5876 | if (!CMSG_OK(my_msg, cmsg)) |
5876 | return -EINVAL; | 5877 | return -EINVAL; |
5877 | 5878 | ||
5878 | /* Should we parse this header or ignore? */ | 5879 | /* Should we parse this header or ignore? */ |
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index b43f1f110f87..ce6cda6b6994 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
@@ -859,7 +859,7 @@ __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event) | |||
859 | union sctp_notification *notification; | 859 | union sctp_notification *notification; |
860 | struct sk_buff *skb; | 860 | struct sk_buff *skb; |
861 | 861 | ||
862 | skb = sctp_event2skb((struct sctp_ulpevent *)event); | 862 | skb = sctp_event2skb(event); |
863 | notification = (union sctp_notification *) skb->data; | 863 | notification = (union sctp_notification *) skb->data; |
864 | return notification->sn_header.sn_type; | 864 | return notification->sn_header.sn_type; |
865 | } | 865 | } |