diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-19 14:05:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-19 14:05:50 -0400 |
commit | 7d7dee96e1a7369eae67e5fe5c987785a1c11e40 (patch) | |
tree | 7c87df02117c7c3ac2ab4b7bd594a2183ec22ff6 | |
parent | f1c9c9797a7c519a70b8e4607f41d97ec59fc8f0 (diff) | |
parent | 4e8cec269dd9e823804141f25ce37c23e72d3c12 (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: (21 commits)
dca: disable dca on IOAT ver.3.0 multiple-IOH platforms
netpoll: Disable IRQ around RCU dereference in netpoll_rx
sctp: Do not reset the packet during sctp_packet_config().
net/llc: storing negative error codes in unsigned short
MAINTAINERS: move atlx discussions to netdev
drivers/net/cxgb3/cxgb3_main.c: prevent reading uninitialized stack memory
drivers/net/eql.c: prevent reading uninitialized stack memory
drivers/net/usb/hso.c: prevent reading uninitialized memory
xfrm: dont assume rcu_read_lock in xfrm_output_one()
r8169: Handle rxfifo errors on 8168 chips
3c59x: Remove atomic context inside vortex_{set|get}_wol
tcp: Prevent overzealous packetization by SWS logic.
net: RPS needs to depend upon USE_GENERIC_SMP_HELPERS
phylib: fix PAL state machine restart on resume
net: use rcu_barrier() in rollback_registered_many
bonding: correctly process non-linear skbs
ipv4: enable getsockopt() for IP_NODEFRAG
ipv4: force_igmp_version ignored when a IGMPv3 query received
ppp: potential NULL dereference in ppp_mp_explode()
net/llc: make opt unsigned in llc_ui_setsockopt()
...
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/dca/dca-core.c | 85 | ||||
-rw-r--r-- | drivers/net/3c59x.c | 7 | ||||
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 3 | ||||
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 3 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 2 | ||||
-rw-r--r-- | drivers/net/eql.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 4 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 9 | ||||
-rw-r--r-- | drivers/net/r8169.c | 5 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 2 | ||||
-rw-r--r-- | include/linux/netpoll.h | 8 | ||||
-rw-r--r-- | include/net/tcp.h | 18 | ||||
-rw-r--r-- | net/Kconfig | 2 | ||||
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 3 | ||||
-rw-r--r-- | net/llc/af_llc.c | 3 | ||||
-rw-r--r-- | net/llc/llc_station.c | 2 | ||||
-rw-r--r-- | net/sched/sch_atm.c | 4 | ||||
-rw-r--r-- | net/sctp/output.c | 1 | ||||
-rw-r--r-- | net/xfrm/xfrm_output.c | 2 |
22 files changed, 136 insertions, 35 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 8540dea232af..411b0d04f69b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1135,7 +1135,7 @@ ATLX ETHERNET DRIVERS | |||
1135 | M: Jay Cliburn <jcliburn@gmail.com> | 1135 | M: Jay Cliburn <jcliburn@gmail.com> |
1136 | M: Chris Snook <chris.snook@gmail.com> | 1136 | M: Chris Snook <chris.snook@gmail.com> |
1137 | M: Jie Yang <jie.yang@atheros.com> | 1137 | M: Jie Yang <jie.yang@atheros.com> |
1138 | L: atl1-devel@lists.sourceforge.net | 1138 | L: netdev@vger.kernel.org |
1139 | W: http://sourceforge.net/projects/atl1 | 1139 | W: http://sourceforge.net/projects/atl1 |
1140 | W: http://atl1.sourceforge.net | 1140 | W: http://atl1.sourceforge.net |
1141 | S: Maintained | 1141 | S: Maintained |
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index 8661c84a105d..b98c67664ae7 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -39,6 +39,10 @@ static DEFINE_SPINLOCK(dca_lock); | |||
39 | 39 | ||
40 | static LIST_HEAD(dca_domains); | 40 | static LIST_HEAD(dca_domains); |
41 | 41 | ||
42 | static BLOCKING_NOTIFIER_HEAD(dca_provider_chain); | ||
43 | |||
44 | static int dca_providers_blocked; | ||
45 | |||
42 | static struct pci_bus *dca_pci_rc_from_dev(struct device *dev) | 46 | static struct pci_bus *dca_pci_rc_from_dev(struct device *dev) |
43 | { | 47 | { |
44 | struct pci_dev *pdev = to_pci_dev(dev); | 48 | struct pci_dev *pdev = to_pci_dev(dev); |
@@ -70,6 +74,60 @@ static void dca_free_domain(struct dca_domain *domain) | |||
70 | kfree(domain); | 74 | kfree(domain); |
71 | } | 75 | } |
72 | 76 | ||
77 | static int dca_provider_ioat_ver_3_0(struct device *dev) | ||
78 | { | ||
79 | struct pci_dev *pdev = to_pci_dev(dev); | ||
80 | |||
81 | return ((pdev->vendor == PCI_VENDOR_ID_INTEL) && | ||
82 | ((pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG0) || | ||
83 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG1) || | ||
84 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG2) || | ||
85 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG3) || | ||
86 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG4) || | ||
87 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG5) || | ||
88 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG6) || | ||
89 | (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_TBG7))); | ||
90 | } | ||
91 | |||
92 | static void unregister_dca_providers(void) | ||
93 | { | ||
94 | struct dca_provider *dca, *_dca; | ||
95 | struct list_head unregistered_providers; | ||
96 | struct dca_domain *domain; | ||
97 | unsigned long flags; | ||
98 | |||
99 | blocking_notifier_call_chain(&dca_provider_chain, | ||
100 | DCA_PROVIDER_REMOVE, NULL); | ||
101 | |||
102 | INIT_LIST_HEAD(&unregistered_providers); | ||
103 | |||
104 | spin_lock_irqsave(&dca_lock, flags); | ||
105 | |||
106 | if (list_empty(&dca_domains)) { | ||
107 | spin_unlock_irqrestore(&dca_lock, flags); | ||
108 | return; | ||
109 | } | ||
110 | |||
111 | /* at this point only one domain in the list is expected */ | ||
112 | domain = list_first_entry(&dca_domains, struct dca_domain, node); | ||
113 | if (!domain) | ||
114 | return; | ||
115 | |||
116 | list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) { | ||
117 | list_del(&dca->node); | ||
118 | list_add(&dca->node, &unregistered_providers); | ||
119 | } | ||
120 | |||
121 | dca_free_domain(domain); | ||
122 | |||
123 | spin_unlock_irqrestore(&dca_lock, flags); | ||
124 | |||
125 | list_for_each_entry_safe(dca, _dca, &unregistered_providers, node) { | ||
126 | dca_sysfs_remove_provider(dca); | ||
127 | list_del(&dca->node); | ||
128 | } | ||
129 | } | ||
130 | |||
73 | static struct dca_domain *dca_find_domain(struct pci_bus *rc) | 131 | static struct dca_domain *dca_find_domain(struct pci_bus *rc) |
74 | { | 132 | { |
75 | struct dca_domain *domain; | 133 | struct dca_domain *domain; |
@@ -90,9 +148,13 @@ static struct dca_domain *dca_get_domain(struct device *dev) | |||
90 | domain = dca_find_domain(rc); | 148 | domain = dca_find_domain(rc); |
91 | 149 | ||
92 | if (!domain) { | 150 | if (!domain) { |
93 | domain = dca_allocate_domain(rc); | 151 | if (dca_provider_ioat_ver_3_0(dev) && !list_empty(&dca_domains)) { |
94 | if (domain) | 152 | dca_providers_blocked = 1; |
95 | list_add(&domain->node, &dca_domains); | 153 | } else { |
154 | domain = dca_allocate_domain(rc); | ||
155 | if (domain) | ||
156 | list_add(&domain->node, &dca_domains); | ||
157 | } | ||
96 | } | 158 | } |
97 | 159 | ||
98 | return domain; | 160 | return domain; |
@@ -293,8 +355,6 @@ void free_dca_provider(struct dca_provider *dca) | |||
293 | } | 355 | } |
294 | EXPORT_SYMBOL_GPL(free_dca_provider); | 356 | EXPORT_SYMBOL_GPL(free_dca_provider); |
295 | 357 | ||
296 | static BLOCKING_NOTIFIER_HEAD(dca_provider_chain); | ||
297 | |||
298 | /** | 358 | /** |
299 | * register_dca_provider - register a dca provider | 359 | * register_dca_provider - register a dca provider |
300 | * @dca - struct created by alloc_dca_provider() | 360 | * @dca - struct created by alloc_dca_provider() |
@@ -306,6 +366,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev) | |||
306 | unsigned long flags; | 366 | unsigned long flags; |
307 | struct dca_domain *domain; | 367 | struct dca_domain *domain; |
308 | 368 | ||
369 | spin_lock_irqsave(&dca_lock, flags); | ||
370 | if (dca_providers_blocked) { | ||
371 | spin_unlock_irqrestore(&dca_lock, flags); | ||
372 | return -ENODEV; | ||
373 | } | ||
374 | spin_unlock_irqrestore(&dca_lock, flags); | ||
375 | |||
309 | err = dca_sysfs_add_provider(dca, dev); | 376 | err = dca_sysfs_add_provider(dca, dev); |
310 | if (err) | 377 | if (err) |
311 | return err; | 378 | return err; |
@@ -313,7 +380,13 @@ int register_dca_provider(struct dca_provider *dca, struct device *dev) | |||
313 | spin_lock_irqsave(&dca_lock, flags); | 380 | spin_lock_irqsave(&dca_lock, flags); |
314 | domain = dca_get_domain(dev); | 381 | domain = dca_get_domain(dev); |
315 | if (!domain) { | 382 | if (!domain) { |
316 | spin_unlock_irqrestore(&dca_lock, flags); | 383 | if (dca_providers_blocked) { |
384 | spin_unlock_irqrestore(&dca_lock, flags); | ||
385 | dca_sysfs_remove_provider(dca); | ||
386 | unregister_dca_providers(); | ||
387 | } else { | ||
388 | spin_unlock_irqrestore(&dca_lock, flags); | ||
389 | } | ||
317 | return -ENODEV; | 390 | return -ENODEV; |
318 | } | 391 | } |
319 | list_add(&dca->node, &domain->dca_providers); | 392 | list_add(&dca->node, &domain->dca_providers); |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 85671adae455..fa42103b2874 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -635,6 +635,9 @@ struct vortex_private { | |||
635 | must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ | 635 | must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ |
636 | large_frames:1, /* accept large frames */ | 636 | large_frames:1, /* accept large frames */ |
637 | handling_irq:1; /* private in_irq indicator */ | 637 | handling_irq:1; /* private in_irq indicator */ |
638 | /* {get|set}_wol operations are already serialized by rtnl. | ||
639 | * no additional locking is required for the enable_wol and acpi_set_WOL() | ||
640 | */ | ||
638 | int drv_flags; | 641 | int drv_flags; |
639 | u16 status_enable; | 642 | u16 status_enable; |
640 | u16 intr_enable; | 643 | u16 intr_enable; |
@@ -2939,13 +2942,11 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
2939 | { | 2942 | { |
2940 | struct vortex_private *vp = netdev_priv(dev); | 2943 | struct vortex_private *vp = netdev_priv(dev); |
2941 | 2944 | ||
2942 | spin_lock_irq(&vp->lock); | ||
2943 | wol->supported = WAKE_MAGIC; | 2945 | wol->supported = WAKE_MAGIC; |
2944 | 2946 | ||
2945 | wol->wolopts = 0; | 2947 | wol->wolopts = 0; |
2946 | if (vp->enable_wol) | 2948 | if (vp->enable_wol) |
2947 | wol->wolopts |= WAKE_MAGIC; | 2949 | wol->wolopts |= WAKE_MAGIC; |
2948 | spin_unlock_irq(&vp->lock); | ||
2949 | } | 2950 | } |
2950 | 2951 | ||
2951 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | 2952 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
@@ -2954,13 +2955,11 @@ static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
2954 | if (wol->wolopts & ~WAKE_MAGIC) | 2955 | if (wol->wolopts & ~WAKE_MAGIC) |
2955 | return -EINVAL; | 2956 | return -EINVAL; |
2956 | 2957 | ||
2957 | spin_lock_irq(&vp->lock); | ||
2958 | if (wol->wolopts & WAKE_MAGIC) | 2958 | if (wol->wolopts & WAKE_MAGIC) |
2959 | vp->enable_wol = 1; | 2959 | vp->enable_wol = 1; |
2960 | else | 2960 | else |
2961 | vp->enable_wol = 0; | 2961 | vp->enable_wol = 0; |
2962 | acpi_set_WOL(dev); | 2962 | acpi_set_WOL(dev); |
2963 | spin_unlock_irq(&vp->lock); | ||
2964 | 2963 | ||
2965 | return 0; | 2964 | return 0; |
2966 | } | 2965 | } |
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 822f586d72af..0ddf4c66afe2 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2466,6 +2466,9 @@ int bond_3ad_lacpdu_recv(struct sk_buff *skb, struct net_device *dev, struct pac | |||
2466 | if (!(dev->flags & IFF_MASTER)) | 2466 | if (!(dev->flags & IFF_MASTER)) |
2467 | goto out; | 2467 | goto out; |
2468 | 2468 | ||
2469 | if (!pskb_may_pull(skb, sizeof(struct lacpdu))) | ||
2470 | goto out; | ||
2471 | |||
2469 | read_lock(&bond->lock); | 2472 | read_lock(&bond->lock); |
2470 | slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev), | 2473 | slave = bond_get_slave_by_dev((struct bonding *)netdev_priv(dev), |
2471 | orig_dev); | 2474 | orig_dev); |
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index c746b331771d..26bb118c4533 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -362,6 +362,9 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct | |||
362 | goto out; | 362 | goto out; |
363 | } | 363 | } |
364 | 364 | ||
365 | if (!pskb_may_pull(skb, arp_hdr_len(bond_dev))) | ||
366 | goto out; | ||
367 | |||
365 | if (skb->len < sizeof(struct arp_pkt)) { | 368 | if (skb->len < sizeof(struct arp_pkt)) { |
366 | pr_debug("Packet is too small to be an ARP\n"); | 369 | pr_debug("Packet is too small to be an ARP\n"); |
367 | goto out; | 370 | goto out; |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index ad19585d960b..f208712c0b90 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2296,6 +2296,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr) | |||
2296 | case CHELSIO_GET_QSET_NUM:{ | 2296 | case CHELSIO_GET_QSET_NUM:{ |
2297 | struct ch_reg edata; | 2297 | struct ch_reg edata; |
2298 | 2298 | ||
2299 | memset(&edata, 0, sizeof(struct ch_reg)); | ||
2300 | |||
2299 | edata.cmd = CHELSIO_GET_QSET_NUM; | 2301 | edata.cmd = CHELSIO_GET_QSET_NUM; |
2300 | edata.val = pi->nqsets; | 2302 | edata.val = pi->nqsets; |
2301 | if (copy_to_user(useraddr, &edata, sizeof(edata))) | 2303 | if (copy_to_user(useraddr, &edata, sizeof(edata))) |
diff --git a/drivers/net/eql.c b/drivers/net/eql.c index dda2c7944da9..0cb1cf9cf4b0 100644 --- a/drivers/net/eql.c +++ b/drivers/net/eql.c | |||
@@ -555,6 +555,8 @@ static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp) | |||
555 | equalizer_t *eql; | 555 | equalizer_t *eql; |
556 | master_config_t mc; | 556 | master_config_t mc; |
557 | 557 | ||
558 | memset(&mc, 0, sizeof(master_config_t)); | ||
559 | |||
558 | if (eql_is_master(dev)) { | 560 | if (eql_is_master(dev)) { |
559 | eql = netdev_priv(dev); | 561 | eql = netdev_priv(dev); |
560 | mc.max_slaves = eql->max_slaves; | 562 | mc.max_slaves = eql->max_slaves; |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 6a6b8199a0d6..6c58da2b882c 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -308,7 +308,7 @@ static int mdio_bus_suspend(struct device *dev) | |||
308 | * may call phy routines that try to grab the same lock, and that may | 308 | * may call phy routines that try to grab the same lock, and that may |
309 | * lead to a deadlock. | 309 | * lead to a deadlock. |
310 | */ | 310 | */ |
311 | if (phydev->attached_dev) | 311 | if (phydev->attached_dev && phydev->adjust_link) |
312 | phy_stop_machine(phydev); | 312 | phy_stop_machine(phydev); |
313 | 313 | ||
314 | if (!mdio_bus_phy_may_suspend(phydev)) | 314 | if (!mdio_bus_phy_may_suspend(phydev)) |
@@ -331,7 +331,7 @@ static int mdio_bus_resume(struct device *dev) | |||
331 | return ret; | 331 | return ret; |
332 | 332 | ||
333 | no_resume: | 333 | no_resume: |
334 | if (phydev->attached_dev) | 334 | if (phydev->attached_dev && phydev->adjust_link) |
335 | phy_start_machine(phydev, NULL); | 335 | phy_start_machine(phydev, NULL); |
336 | 336 | ||
337 | return 0; | 337 | return 0; |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 6695a51e09e9..736b91703b3e 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1314,8 +1314,13 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1314 | hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN; | 1314 | hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN; |
1315 | i = 0; | 1315 | i = 0; |
1316 | list_for_each_entry(pch, &ppp->channels, clist) { | 1316 | list_for_each_entry(pch, &ppp->channels, clist) { |
1317 | navail += pch->avail = (pch->chan != NULL); | 1317 | if (pch->chan) { |
1318 | pch->speed = pch->chan->speed; | 1318 | pch->avail = 1; |
1319 | navail++; | ||
1320 | pch->speed = pch->chan->speed; | ||
1321 | } else { | ||
1322 | pch->avail = 0; | ||
1323 | } | ||
1319 | if (pch->avail) { | 1324 | if (pch->avail) { |
1320 | if (skb_queue_empty(&pch->file.xq) || | 1325 | if (skb_queue_empty(&pch->file.xq) || |
1321 | !pch->had_frag) { | 1326 | !pch->had_frag) { |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 078bbf4e6f19..a0da4a17b025 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2934,7 +2934,7 @@ static const struct rtl_cfg_info { | |||
2934 | .hw_start = rtl_hw_start_8168, | 2934 | .hw_start = rtl_hw_start_8168, |
2935 | .region = 2, | 2935 | .region = 2, |
2936 | .align = 8, | 2936 | .align = 8, |
2937 | .intr_event = SYSErr | LinkChg | RxOverflow | | 2937 | .intr_event = SYSErr | RxFIFOOver | LinkChg | RxOverflow | |
2938 | TxErr | TxOK | RxOK | RxErr, | 2938 | TxErr | TxOK | RxOK | RxErr, |
2939 | .napi_event = TxErr | TxOK | RxOK | RxOverflow, | 2939 | .napi_event = TxErr | TxOK | RxOK | RxOverflow, |
2940 | .features = RTL_FEATURE_GMII | RTL_FEATURE_MSI, | 2940 | .features = RTL_FEATURE_GMII | RTL_FEATURE_MSI, |
@@ -4625,8 +4625,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
4625 | } | 4625 | } |
4626 | 4626 | ||
4627 | /* Work around for rx fifo overflow */ | 4627 | /* Work around for rx fifo overflow */ |
4628 | if (unlikely(status & RxFIFOOver) && | 4628 | if (unlikely(status & RxFIFOOver)) { |
4629 | (tp->mac_version == RTL_GIGA_MAC_VER_11)) { | ||
4630 | netif_stop_queue(dev); | 4629 | netif_stop_queue(dev); |
4631 | rtl8169_tx_timeout(dev); | 4630 | rtl8169_tx_timeout(dev); |
4632 | break; | 4631 | break; |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 6efca66b8766..1cd752f9a6e1 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -1652,6 +1652,8 @@ static int hso_get_count(struct hso_serial *serial, | |||
1652 | struct uart_icount cnow; | 1652 | struct uart_icount cnow; |
1653 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 1653 | struct hso_tiocmget *tiocmget = serial->tiocmget; |
1654 | 1654 | ||
1655 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | ||
1656 | |||
1655 | if (!tiocmget) | 1657 | if (!tiocmget) |
1656 | return -ENOENT; | 1658 | return -ENOENT; |
1657 | spin_lock_irq(&serial->serial_lock); | 1659 | spin_lock_irq(&serial->serial_lock); |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 791d5109f34c..50d8009be86c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -63,20 +63,20 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
63 | unsigned long flags; | 63 | unsigned long flags; |
64 | bool ret = false; | 64 | bool ret = false; |
65 | 65 | ||
66 | rcu_read_lock_bh(); | 66 | local_irq_save(flags); |
67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | 67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); |
68 | 68 | ||
69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) |
70 | goto out; | 70 | goto out; |
71 | 71 | ||
72 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 72 | spin_lock(&npinfo->rx_lock); |
73 | /* check rx_flags again with the lock held */ | 73 | /* check rx_flags again with the lock held */ |
74 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 74 | if (npinfo->rx_flags && __netpoll_rx(skb)) |
75 | ret = true; | 75 | ret = true; |
76 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 76 | spin_unlock(&npinfo->rx_lock); |
77 | 77 | ||
78 | out: | 78 | out: |
79 | rcu_read_unlock_bh(); | 79 | local_irq_restore(flags); |
80 | return ret; | 80 | return ret; |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index eaa9582779d0..3e4b33e36602 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -475,8 +475,22 @@ extern unsigned int tcp_current_mss(struct sock *sk); | |||
475 | /* Bound MSS / TSO packet size with the half of the window */ | 475 | /* Bound MSS / TSO packet size with the half of the window */ |
476 | static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) | 476 | static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) |
477 | { | 477 | { |
478 | if (tp->max_window && pktsize > (tp->max_window >> 1)) | 478 | int cutoff; |
479 | return max(tp->max_window >> 1, 68U - tp->tcp_header_len); | 479 | |
480 | /* When peer uses tiny windows, there is no use in packetizing | ||
481 | * to sub-MSS pieces for the sake of SWS or making sure there | ||
482 | * are enough packets in the pipe for fast recovery. | ||
483 | * | ||
484 | * On the other hand, for extremely large MSS devices, handling | ||
485 | * smaller than MSS windows in this way does make sense. | ||
486 | */ | ||
487 | if (tp->max_window >= 512) | ||
488 | cutoff = (tp->max_window >> 1); | ||
489 | else | ||
490 | cutoff = tp->max_window; | ||
491 | |||
492 | if (cutoff && pktsize > cutoff) | ||
493 | return max_t(int, cutoff, 68U - tp->tcp_header_len); | ||
480 | else | 494 | else |
481 | return pktsize; | 495 | return pktsize; |
482 | } | 496 | } |
diff --git a/net/Kconfig b/net/Kconfig index e330594d3709..e926884c1675 100644 --- a/net/Kconfig +++ b/net/Kconfig | |||
@@ -217,7 +217,7 @@ source "net/dns_resolver/Kconfig" | |||
217 | 217 | ||
218 | config RPS | 218 | config RPS |
219 | boolean | 219 | boolean |
220 | depends on SMP && SYSFS | 220 | depends on SMP && SYSFS && USE_GENERIC_SMP_HELPERS |
221 | default y | 221 | default y |
222 | 222 | ||
223 | menu "Network testing" | 223 | menu "Network testing" |
diff --git a/net/core/dev.c b/net/core/dev.c index b9b22a3c4c8f..660dd41aaaa6 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4845,7 +4845,7 @@ static void rollback_registered_many(struct list_head *head) | |||
4845 | dev = list_first_entry(head, struct net_device, unreg_list); | 4845 | dev = list_first_entry(head, struct net_device, unreg_list); |
4846 | call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev); | 4846 | call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev); |
4847 | 4847 | ||
4848 | synchronize_net(); | 4848 | rcu_barrier(); |
4849 | 4849 | ||
4850 | list_for_each_entry(dev, head, unreg_list) | 4850 | list_for_each_entry(dev, head, unreg_list) |
4851 | dev_put(dev); | 4851 | dev_put(dev); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index a1ad0e7180d2..1fdcacd36ce7 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -834,7 +834,7 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, | |||
834 | int mark = 0; | 834 | int mark = 0; |
835 | 835 | ||
836 | 836 | ||
837 | if (len == 8) { | 837 | if (len == 8 || IGMP_V2_SEEN(in_dev)) { |
838 | if (ih->code == 0) { | 838 | if (ih->code == 0) { |
839 | /* Alas, old v1 router presents here. */ | 839 | /* Alas, old v1 router presents here. */ |
840 | 840 | ||
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 6c40a8c46e79..64b70ad162e3 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -1129,6 +1129,9 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname, | |||
1129 | case IP_HDRINCL: | 1129 | case IP_HDRINCL: |
1130 | val = inet->hdrincl; | 1130 | val = inet->hdrincl; |
1131 | break; | 1131 | break; |
1132 | case IP_NODEFRAG: | ||
1133 | val = inet->nodefrag; | ||
1134 | break; | ||
1132 | case IP_MTU_DISCOVER: | 1135 | case IP_MTU_DISCOVER: |
1133 | val = inet->pmtudisc; | 1136 | val = inet->pmtudisc; |
1134 | break; | 1137 | break; |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 023ba820236f..582612998211 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -1024,7 +1024,8 @@ static int llc_ui_setsockopt(struct socket *sock, int level, int optname, | |||
1024 | { | 1024 | { |
1025 | struct sock *sk = sock->sk; | 1025 | struct sock *sk = sock->sk; |
1026 | struct llc_sock *llc = llc_sk(sk); | 1026 | struct llc_sock *llc = llc_sk(sk); |
1027 | int rc = -EINVAL, opt; | 1027 | unsigned int opt; |
1028 | int rc = -EINVAL; | ||
1028 | 1029 | ||
1029 | lock_sock(sk); | 1030 | lock_sock(sk); |
1030 | if (unlikely(level != SOL_LLC || optlen != sizeof(int))) | 1031 | if (unlikely(level != SOL_LLC || optlen != sizeof(int))) |
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index e4dae0244d76..cf4aea3ba30f 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c | |||
@@ -689,7 +689,7 @@ static void llc_station_rcv(struct sk_buff *skb) | |||
689 | 689 | ||
690 | int __init llc_station_init(void) | 690 | int __init llc_station_init(void) |
691 | { | 691 | { |
692 | u16 rc = -ENOBUFS; | 692 | int rc = -ENOBUFS; |
693 | struct sk_buff *skb; | 693 | struct sk_buff *skb; |
694 | struct llc_station_state_ev *ev; | 694 | struct llc_station_state_ev *ev; |
695 | 695 | ||
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 340662789529..6318e1136b83 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -255,10 +255,6 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
255 | error = -EINVAL; | 255 | error = -EINVAL; |
256 | goto err_out; | 256 | goto err_out; |
257 | } | 257 | } |
258 | if (!list_empty(&flow->list)) { | ||
259 | error = -EEXIST; | ||
260 | goto err_out; | ||
261 | } | ||
262 | } else { | 258 | } else { |
263 | int i; | 259 | int i; |
264 | unsigned long cl; | 260 | unsigned long cl; |
diff --git a/net/sctp/output.c b/net/sctp/output.c index a646681f5acd..bcc4590ccaf2 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -92,7 +92,6 @@ struct sctp_packet *sctp_packet_config(struct sctp_packet *packet, | |||
92 | SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__, | 92 | SCTP_DEBUG_PRINTK("%s: packet:%p vtag:0x%x\n", __func__, |
93 | packet, vtag); | 93 | packet, vtag); |
94 | 94 | ||
95 | sctp_packet_reset(packet); | ||
96 | packet->vtag = vtag; | 95 | packet->vtag = vtag; |
97 | 96 | ||
98 | if (ecn_capable && sctp_packet_empty(packet)) { | 97 | if (ecn_capable && sctp_packet_empty(packet)) { |
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index a3cca0a94346..64f2ae1fdc15 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c | |||
@@ -101,7 +101,7 @@ resume: | |||
101 | err = -EHOSTUNREACH; | 101 | err = -EHOSTUNREACH; |
102 | goto error_nolock; | 102 | goto error_nolock; |
103 | } | 103 | } |
104 | skb_dst_set_noref(skb, dst); | 104 | skb_dst_set(skb, dst_clone(dst)); |
105 | x = dst->xfrm; | 105 | x = dst->xfrm; |
106 | } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL)); | 106 | } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL)); |
107 | 107 | ||