aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-14 12:31:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-14 12:31:19 -0400
commitab3c556de19b1888b0830ef066524884d4788131 (patch)
tree7652961084c69e00267eda767edeeac5e20aed51
parentc4e7ac5d427a48b91752671523f39a04e63e12ff (diff)
parentcae7ca3d3de48851e929de9469397749638df779 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPVS]: Use IP_VS_WAIT_WHILE when encessary. [NET]: Share correct feature code between bridging and bonding [ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc [IRDA] irda-usb.c: mostly kmalloc + memset conversion to k[cz]alloc [WAN] drivers/net/wan/hdlc_fr.c: kmalloc + memset conversion to kzalloc [DCCP]: fix memory leak and clean up style - dccp_feat_empty_confirm() [DCCP]: fix theoretical ccids_{read,write}_lock() race [XFRM]: Clean up duplicate includes in net/xfrm/ [TIPC]: Clean up duplicate includes in net/tipc/ [SUNRPC]: Clean up duplicate includes in net/sunrpc/ [PKT_SCHED]: Clean up duplicate includes in net/sched/ [IPV6]: Clean up duplicate includes in net/ipv6/ [IPV4]: Clean up duplicate includes in net/ipv4/ [ATM]: Clean up duplicate includes in net/atm/ [ATM]: Clean up duplicate includes in drivers/atm/ [IPCONFIG]: ip_auto_config fix [ATM]: fore200e_param_bs_queue() must be __devinit
-rw-r--r--drivers/atm/fore200e.c2
-rw-r--r--drivers/atm/iphase.c12
-rw-r--r--drivers/atm/lanai.c1
-rw-r--r--drivers/net/bonding/bond_main.c34
-rw-r--r--drivers/net/irda/irda-usb.c24
-rw-r--r--drivers/net/wan/hdlc_fr.c3
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--net/atm/lec.c1
-rw-r--r--net/bridge/br_device.c2
-rw-r--r--net/bridge/br_if.c36
-rw-r--r--net/core/dev.c39
-rw-r--r--net/dccp/ccid.c1
-rw-r--r--net/dccp/feat.c14
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv4/ipconfig.c6
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c3
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c1
-rw-r--r--net/ipv6/tcp_ipv6.c1
-rw-r--r--net/sched/act_police.c1
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c1
-rw-r--r--net/tipc/port.c1
-rw-r--r--net/xfrm/xfrm_policy.c3
-rw-r--r--net/xfrm/xfrm_state.c3
23 files changed, 94 insertions, 98 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 405ee5e09221..8b12925fe7a4 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2435,7 +2435,7 @@ fore200e_init_cmd_queue(struct fore200e* fore200e)
2435} 2435}
2436 2436
2437 2437
2438static void __init 2438static void __devinit
2439fore200e_param_bs_queue(struct fore200e* fore200e, 2439fore200e_param_bs_queue(struct fore200e* fore200e,
2440 enum buffer_scheme scheme, enum buffer_magn magn, 2440 enum buffer_scheme scheme, enum buffer_magn magn,
2441 int queue_length, int pool_size, int supply_blksize) 2441 int queue_length, int pool_size, int supply_blksize)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index a3b605a0ca17..ef52452640e0 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)
1601 1601
1602 skb_queue_head_init(&iadev->rx_dma_q); 1602 skb_queue_head_init(&iadev->rx_dma_q);
1603 iadev->rx_free_desc_qhead = NULL; 1603 iadev->rx_free_desc_qhead = NULL;
1604 iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL); 1604
1605 if (!iadev->rx_open) 1605 iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
1606 { 1606 if (!iadev->rx_open) {
1607 printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n", 1607 printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
1608 dev->number); 1608 dev->number);
1609 goto err_free_dle; 1609 goto err_free_dle;
1610 } 1610 }
1611 memset(iadev->rx_open, 0, 4*iadev->num_vc); 1611
1612 iadev->rxing = 1; 1612 iadev->rxing = 1;
1613 iadev->rx_pkt_cnt = 0; 1613 iadev->rx_pkt_cnt = 0;
1614 /* Mode Register */ 1614 /* Mode Register */
@@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3171 unsigned long flags; 3171 unsigned long flags;
3172 int ret; 3172 int ret;
3173 3173
3174 iadev = kmalloc(sizeof(*iadev), GFP_KERNEL); 3174 iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
3175 if (!iadev) { 3175 if (!iadev) {
3176 ret = -ENOMEM; 3176 ret = -ENOMEM;
3177 goto err_out; 3177 goto err_out;
3178 } 3178 }
3179 memset(iadev, 0, sizeof(*iadev)); 3179
3180 iadev->pci = pdev; 3180 iadev->pci = pdev;
3181 3181
3182 IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n", 3182 IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 55fd1b4543fd..144a49f15220 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -65,7 +65,6 @@
65#include <linux/init.h> 65#include <linux/init.h>
66#include <linux/delay.h> 66#include <linux/delay.h>
67#include <linux/interrupt.h> 67#include <linux/interrupt.h>
68#include <linux/dma-mapping.h>
69 68
70/* -------------------- TUNABLE PARAMATERS: */ 69/* -------------------- TUNABLE PARAMATERS: */
71 70
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 070b78d959cc..1afda3230def 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1202,43 +1202,35 @@ static int bond_sethwaddr(struct net_device *bond_dev,
1202 return 0; 1202 return 0;
1203} 1203}
1204 1204
1205#define BOND_INTERSECT_FEATURES \ 1205#define BOND_VLAN_FEATURES \
1206 (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_TSO | NETIF_F_UFO) 1206 (NETIF_F_VLAN_CHALLENGED | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX | \
1207 NETIF_F_HW_VLAN_FILTER)
1207 1208
1208/* 1209/*
1209 * Compute the common dev->feature set available to all slaves. Some 1210 * Compute the common dev->feature set available to all slaves. Some
1210 * feature bits are managed elsewhere, so preserve feature bits set on 1211 * feature bits are managed elsewhere, so preserve those feature bits
1211 * master device that are not part of the examined set. 1212 * on the master device.
1212 */ 1213 */
1213static int bond_compute_features(struct bonding *bond) 1214static int bond_compute_features(struct bonding *bond)
1214{ 1215{
1215 unsigned long features = BOND_INTERSECT_FEATURES;
1216 struct slave *slave; 1216 struct slave *slave;
1217 struct net_device *bond_dev = bond->dev; 1217 struct net_device *bond_dev = bond->dev;
1218 unsigned long features = bond_dev->features;
1218 unsigned short max_hard_header_len = ETH_HLEN; 1219 unsigned short max_hard_header_len = ETH_HLEN;
1219 int i; 1220 int i;
1220 1221
1222 features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
1223 features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
1224 NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
1225
1221 bond_for_each_slave(bond, slave, i) { 1226 bond_for_each_slave(bond, slave, i) {
1222 features &= (slave->dev->features & BOND_INTERSECT_FEATURES); 1227 features = netdev_compute_features(features,
1228 slave->dev->features);
1223 if (slave->dev->hard_header_len > max_hard_header_len) 1229 if (slave->dev->hard_header_len > max_hard_header_len)
1224 max_hard_header_len = slave->dev->hard_header_len; 1230 max_hard_header_len = slave->dev->hard_header_len;
1225 } 1231 }
1226 1232
1227 if ((features & NETIF_F_SG) && 1233 features |= (bond_dev->features & BOND_VLAN_FEATURES);
1228 !(features & NETIF_F_ALL_CSUM))
1229 features &= ~NETIF_F_SG;
1230
1231 /*
1232 * features will include NETIF_F_TSO (NETIF_F_UFO) iff all
1233 * slave devices support NETIF_F_TSO (NETIF_F_UFO), which
1234 * implies that all slaves also support scatter-gather
1235 * (NETIF_F_SG), which implies that features also includes
1236 * NETIF_F_SG. So no need to check whether we have an
1237 * illegal combination of NETIF_F_{TSO,UFO} and
1238 * !NETIF_F_SG
1239 */
1240
1241 features |= (bond_dev->features & ~BOND_INTERSECT_FEATURES);
1242 bond_dev->features = features; 1234 bond_dev->features = features;
1243 bond_dev->hard_header_len = max_hard_header_len; 1235 bond_dev->hard_header_len = max_hard_header_len;
1244 1236
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 0ac240ca905b..3b0fd83fa266 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1561,10 +1561,9 @@ static inline struct irda_class_desc *irda_usb_find_class_desc(struct usb_interf
1561 struct irda_class_desc *desc; 1561 struct irda_class_desc *desc;
1562 int ret; 1562 int ret;
1563 1563
1564 desc = kmalloc(sizeof (*desc), GFP_KERNEL); 1564 desc = kzalloc(sizeof(*desc), GFP_KERNEL);
1565 if (desc == NULL) 1565 if (!desc)
1566 return NULL; 1566 return NULL;
1567 memset(desc, 0, sizeof(*desc));
1568 1567
1569 /* USB-IrDA class spec 1.0: 1568 /* USB-IrDA class spec 1.0:
1570 * 6.1.3: Standard "Get Descriptor" Device Request is not 1569 * 6.1.3: Standard "Get Descriptor" Device Request is not
@@ -1617,7 +1616,7 @@ static int irda_usb_probe(struct usb_interface *intf,
1617{ 1616{
1618 struct net_device *net; 1617 struct net_device *net;
1619 struct usb_device *dev = interface_to_usbdev(intf); 1618 struct usb_device *dev = interface_to_usbdev(intf);
1620 struct irda_usb_cb *self = NULL; 1619 struct irda_usb_cb *self;
1621 struct usb_host_interface *interface; 1620 struct usb_host_interface *interface;
1622 struct irda_class_desc *irda_desc; 1621 struct irda_class_desc *irda_desc;
1623 int ret = -ENOMEM; 1622 int ret = -ENOMEM;
@@ -1655,7 +1654,7 @@ static int irda_usb_probe(struct usb_interface *intf,
1655 self->header_length = USB_IRDA_HEADER; 1654 self->header_length = USB_IRDA_HEADER;
1656 } 1655 }
1657 1656
1658 self->rx_urb = kzalloc(self->max_rx_urb * sizeof(struct urb *), 1657 self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struct urb *),
1659 GFP_KERNEL); 1658 GFP_KERNEL);
1660 1659
1661 for (i = 0; i < self->max_rx_urb; i++) { 1660 for (i = 0; i < self->max_rx_urb; i++) {
@@ -1715,7 +1714,7 @@ static int irda_usb_probe(struct usb_interface *intf,
1715 /* Find IrDA class descriptor */ 1714 /* Find IrDA class descriptor */
1716 irda_desc = irda_usb_find_class_desc(intf); 1715 irda_desc = irda_usb_find_class_desc(intf);
1717 ret = -ENODEV; 1716 ret = -ENODEV;
1718 if (irda_desc == NULL) 1717 if (!irda_desc)
1719 goto err_out_3; 1718 goto err_out_3;
1720 1719
1721 if (self->needspatch) { 1720 if (self->needspatch) {
@@ -1738,15 +1737,13 @@ static int irda_usb_probe(struct usb_interface *intf,
1738 /* Don't change this buffer size and allocation without doing 1737 /* Don't change this buffer size and allocation without doing
1739 * some heavy and complete testing. Don't ask why :-( 1738 * some heavy and complete testing. Don't ask why :-(
1740 * Jean II */ 1739 * Jean II */
1741 self->speed_buff = kmalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL); 1740 self->speed_buff = kzalloc(IRDA_USB_SPEED_MTU, GFP_KERNEL);
1742 if (self->speed_buff == NULL) 1741 if (!self->speed_buff)
1743 goto err_out_3; 1742 goto err_out_3;
1744 1743
1745 memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);
1746
1747 self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length, 1744 self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
1748 GFP_KERNEL); 1745 GFP_KERNEL);
1749 if (self->tx_buff == NULL) 1746 if (!self->tx_buff)
1750 goto err_out_4; 1747 goto err_out_4;
1751 1748
1752 ret = irda_usb_open(self); 1749 ret = irda_usb_open(self);
@@ -1767,12 +1764,11 @@ static int irda_usb_probe(struct usb_interface *intf,
1767 1764
1768 /* replace IrDA class descriptor with what patched device is now reporting */ 1765 /* replace IrDA class descriptor with what patched device is now reporting */
1769 irda_desc = irda_usb_find_class_desc (self->usbintf); 1766 irda_desc = irda_usb_find_class_desc (self->usbintf);
1770 if (irda_desc == NULL) { 1767 if (!irda_desc) {
1771 ret = -ENODEV; 1768 ret = -ENODEV;
1772 goto err_out_6; 1769 goto err_out_6;
1773 } 1770 }
1774 if (self->irda_desc) 1771 kfree(self->irda_desc);
1775 kfree (self->irda_desc);
1776 self->irda_desc = irda_desc; 1772 self->irda_desc = irda_desc;
1777 irda_usb_init_qos(self); 1773 irda_usb_init_qos(self);
1778 } 1774 }
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 15b6e07a4382..071a64cacd5c 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -212,14 +212,13 @@ static pvc_device* add_pvc(struct net_device *dev, u16 dlci)
212 pvc_p = &(*pvc_p)->next; 212 pvc_p = &(*pvc_p)->next;
213 } 213 }
214 214
215 pvc = kmalloc(sizeof(pvc_device), GFP_ATOMIC); 215 pvc = kzalloc(sizeof(pvc_device), GFP_ATOMIC);
216#ifdef DEBUG_PVC 216#ifdef DEBUG_PVC
217 printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev); 217 printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev);
218#endif 218#endif
219 if (!pvc) 219 if (!pvc)
220 return NULL; 220 return NULL;
221 221
222 memset(pvc, 0, sizeof(pvc_device));
223 pvc->dlci = dlci; 222 pvc->dlci = dlci;
224 pvc->frad = dev; 223 pvc->frad = dev;
225 pvc->next = *pvc_p; /* Put it in the chain */ 224 pvc->next = *pvc_p; /* Put it in the chain */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4a616d73cc25..e679b2751665 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1131,6 +1131,8 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
1131 1131
1132extern void linkwatch_run_queue(void); 1132extern void linkwatch_run_queue(void);
1133 1133
1134extern int netdev_compute_features(unsigned long all, unsigned long one);
1135
1134static inline int net_gso_ok(int features, int gso_type) 1136static inline int net_gso_ok(int features, int gso_type)
1135{ 1137{
1136 int feature = gso_type << NETIF_F_GSO_SHIFT; 1138 int feature = gso_type << NETIF_F_GSO_SHIFT;
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 2770fb451ae8..59d5aa3366f2 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -21,7 +21,6 @@
21#include <net/dst.h> 21#include <net/dst.h>
22#include <linux/proc_fs.h> 22#include <linux/proc_fs.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/proc_fs.h>
25#include <linux/seq_file.h> 24#include <linux/seq_file.h>
26 25
27/* TokenRing if needed */ 26/* TokenRing if needed */
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 5e1892d8d874..0eded176ce99 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -179,5 +179,5 @@ void br_dev_setup(struct net_device *dev)
179 dev->priv_flags = IFF_EBRIDGE; 179 dev->priv_flags = IFF_EBRIDGE;
180 180
181 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | 181 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
182 NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST; 182 NETIF_F_GSO_MASK | NETIF_F_NO_CSUM | NETIF_F_LLTX;
183} 183}
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index b40dada002bf..749f0e8f541d 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -349,43 +349,15 @@ int br_min_mtu(const struct net_bridge *br)
349void br_features_recompute(struct net_bridge *br) 349void br_features_recompute(struct net_bridge *br)
350{ 350{
351 struct net_bridge_port *p; 351 struct net_bridge_port *p;
352 unsigned long features, checksum; 352 unsigned long features;
353 353
354 checksum = br->feature_mask & NETIF_F_ALL_CSUM ? NETIF_F_NO_CSUM : 0; 354 features = br->feature_mask;
355 features = br->feature_mask & ~NETIF_F_ALL_CSUM;
356 355
357 list_for_each_entry(p, &br->port_list, list) { 356 list_for_each_entry(p, &br->port_list, list) {
358 unsigned long feature = p->dev->features; 357 features = netdev_compute_features(features, p->dev->features);
359
360 /* if device needs checksumming, downgrade to hw checksumming */
361 if (checksum & NETIF_F_NO_CSUM && !(feature & NETIF_F_NO_CSUM))
362 checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM;
363
364 /* if device can't do all checksum, downgrade to ipv4/ipv6 */
365 if (checksum & NETIF_F_HW_CSUM && !(feature & NETIF_F_HW_CSUM))
366 checksum ^= NETIF_F_HW_CSUM
367 | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
368
369 if (checksum & NETIF_F_IPV6_CSUM && !(feature & NETIF_F_IPV6_CSUM))
370 checksum &= ~NETIF_F_IPV6_CSUM;
371
372 if (!(feature & NETIF_F_IP_CSUM))
373 checksum = 0;
374
375 if (feature & NETIF_F_GSO)
376 feature |= NETIF_F_GSO_SOFTWARE;
377 feature |= NETIF_F_GSO;
378
379 features &= feature;
380 } 358 }
381 359
382 if (!(checksum & NETIF_F_ALL_CSUM)) 360 br->dev->features = features;
383 features &= ~NETIF_F_SG;
384 if (!(features & NETIF_F_SG))
385 features &= ~NETIF_F_GSO_MASK;
386
387 br->dev->features = features | checksum | NETIF_F_LLTX |
388 NETIF_F_GSO_ROBUST;
389} 361}
390 362
391/* called with RTNL */ 363/* called with RTNL */
diff --git a/net/core/dev.c b/net/core/dev.c
index 6cc8a70350ac..a76021c71207 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3993,6 +3993,45 @@ static int __init netdev_dma_register(void)
3993static int __init netdev_dma_register(void) { return -ENODEV; } 3993static int __init netdev_dma_register(void) { return -ENODEV; }
3994#endif /* CONFIG_NET_DMA */ 3994#endif /* CONFIG_NET_DMA */
3995 3995
3996/**
3997 * netdev_compute_feature - compute conjunction of two feature sets
3998 * @all: first feature set
3999 * @one: second feature set
4000 *
4001 * Computes a new feature set after adding a device with feature set
4002 * @one to the master device with current feature set @all. Returns
4003 * the new feature set.
4004 */
4005int netdev_compute_features(unsigned long all, unsigned long one)
4006{
4007 /* if device needs checksumming, downgrade to hw checksumming */
4008 if (all & NETIF_F_NO_CSUM && !(one & NETIF_F_NO_CSUM))
4009 all ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM;
4010
4011 /* if device can't do all checksum, downgrade to ipv4/ipv6 */
4012 if (all & NETIF_F_HW_CSUM && !(one & NETIF_F_HW_CSUM))
4013 all ^= NETIF_F_HW_CSUM
4014 | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
4015
4016 if (one & NETIF_F_GSO)
4017 one |= NETIF_F_GSO_SOFTWARE;
4018 one |= NETIF_F_GSO;
4019
4020 /* If even one device supports robust GSO, enable it for all. */
4021 if (one & NETIF_F_GSO_ROBUST)
4022 all |= NETIF_F_GSO_ROBUST;
4023
4024 all &= one | NETIF_F_LLTX;
4025
4026 if (!(all & NETIF_F_ALL_CSUM))
4027 all &= ~NETIF_F_SG;
4028 if (!(all & NETIF_F_SG))
4029 all &= ~NETIF_F_GSO_MASK;
4030
4031 return all;
4032}
4033EXPORT_SYMBOL(netdev_compute_features);
4034
3996/* 4035/*
3997 * Initialize the DEV module. At boot time this walks the device list and 4036 * Initialize the DEV module. At boot time this walks the device list and
3998 * unhooks any devices that fail to initialise (normally hardware not 4037 * unhooks any devices that fail to initialise (normally hardware not
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index ccbf72c793b6..c45088b5e6fb 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -40,6 +40,7 @@ static inline void ccids_write_unlock(void)
40static inline void ccids_read_lock(void) 40static inline void ccids_read_lock(void)
41{ 41{
42 atomic_inc(&ccids_lockct); 42 atomic_inc(&ccids_lockct);
43 smp_mb__after_atomic_inc();
43 spin_unlock_wait(&ccids_lock); 44 spin_unlock_wait(&ccids_lock);
44} 45}
45 46
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index cd845df5320d..5ebdd86c1b99 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -327,10 +327,16 @@ static void dccp_feat_empty_confirm(struct dccp_minisock *dmsk,
327 } 327 }
328 328
329 switch (type) { 329 switch (type) {
330 case DCCPO_CHANGE_L: opt->dccpop_type = DCCPO_CONFIRM_R; break; 330 case DCCPO_CHANGE_L:
331 case DCCPO_CHANGE_R: opt->dccpop_type = DCCPO_CONFIRM_L; break; 331 opt->dccpop_type = DCCPO_CONFIRM_R;
332 default: DCCP_WARN("invalid type %d\n", type); return; 332 break;
333 333 case DCCPO_CHANGE_R:
334 opt->dccpop_type = DCCPO_CONFIRM_L;
335 break;
336 default:
337 DCCP_WARN("invalid type %d\n", type);
338 kfree(opt);
339 return;
334 } 340 }
335 opt->dccpop_feat = feature; 341 opt->dccpop_feat = feature;
336 opt->dccpop_val = NULL; 342 opt->dccpop_val = NULL;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c9e2b5e6305e..0f1d7beacf78 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -75,7 +75,6 @@
75#include <net/icmp.h> 75#include <net/icmp.h>
76#include <net/checksum.h> 76#include <net/checksum.h>
77#include <net/inetpeer.h> 77#include <net/inetpeer.h>
78#include <net/checksum.h>
79#include <linux/igmp.h> 78#include <linux/igmp.h>
80#include <linux/netfilter_ipv4.h> 79#include <linux/netfilter_ipv4.h>
81#include <linux/netfilter_bridge.h> 80#include <linux/netfilter_bridge.h>
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 342ca8d89458..c5b247077539 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1281,9 +1281,9 @@ static int __init ip_auto_config(void)
1281 */ 1281 */
1282 if (ic_myaddr == NONE || 1282 if (ic_myaddr == NONE ||
1283#ifdef CONFIG_ROOT_NFS 1283#ifdef CONFIG_ROOT_NFS
1284 (MAJOR(ROOT_DEV) == UNNAMED_MAJOR 1284 (root_server_addr == NONE
1285 && root_server_addr == NONE 1285 && ic_servaddr == NONE
1286 && ic_servaddr == NONE) || 1286 && ROOT_DEV == Root_NFS) ||
1287#endif 1287#endif
1288 ic_first_dev->next) { 1288 ic_first_dev->next) {
1289#ifdef IPCONFIG_DYNAMIC 1289#ifdef IPCONFIG_DYNAMIC
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index e1052bcf4ed1..902fd578aa3c 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -29,7 +29,6 @@
29#include <linux/proc_fs.h> 29#include <linux/proc_fs.h>
30#include <linux/workqueue.h> 30#include <linux/workqueue.h>
31#include <linux/swap.h> 31#include <linux/swap.h>
32#include <linux/proc_fs.h>
33#include <linux/seq_file.h> 32#include <linux/seq_file.h>
34 33
35#include <linux/netfilter.h> 34#include <linux/netfilter.h>
@@ -909,7 +908,7 @@ ip_vs_edit_dest(struct ip_vs_service *svc, struct ip_vs_dest_user *udest)
909 write_lock_bh(&__ip_vs_svc_lock); 908 write_lock_bh(&__ip_vs_svc_lock);
910 909
911 /* Wait until all other svc users go away */ 910 /* Wait until all other svc users go away */
912 while (atomic_read(&svc->usecnt) > 1) {}; 911 IP_VS_WAIT_WHILE(atomic_read(&svc->usecnt) > 1);
913 912
914 /* call the update_service, because server weight may be changed */ 913 /* call the update_service, because server weight may be changed */
915 svc->scheduler->update_service(svc); 914 svc->scheduler->update_service(svc);
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index dcc12b183474..69bd362b5fa2 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -19,7 +19,6 @@
19#include <linux/udp.h> 19#include <linux/udp.h>
20#include <linux/icmp.h> 20#include <linux/icmp.h>
21#include <linux/if_arp.h> 21#include <linux/if_arp.h>
22#include <linux/proc_fs.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
24#include <linux/netfilter_arp.h> 23#include <linux/netfilter_arp.h>
25#include <linux/netfilter/x_tables.h> 24#include <linux/netfilter/x_tables.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index cbdb78487915..0f7defb482e9 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -56,7 +56,6 @@
56#include <net/inet_ecn.h> 56#include <net/inet_ecn.h>
57#include <net/protocol.h> 57#include <net/protocol.h>
58#include <net/xfrm.h> 58#include <net/xfrm.h>
59#include <net/addrconf.h>
60#include <net/snmp.h> 59#include <net/snmp.h>
61#include <net/dsfield.h> 60#include <net/dsfield.h>
62#include <net/timewait_sock.h> 61#include <net/timewait_sock.h>
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index bf90e60f8411..6085be578459 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -16,7 +16,6 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/skbuff.h> 18#include <linux/skbuff.h>
19#include <linux/module.h>
20#include <linux/rtnetlink.h> 19#include <linux/rtnetlink.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <net/act_api.h> 21#include <net/act_api.h>
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index dc2f41e9f577..7da7050f06c3 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -42,7 +42,6 @@
42#include <linux/pagemap.h> 42#include <linux/pagemap.h>
43 43
44#include <linux/sunrpc/auth_gss.h> 44#include <linux/sunrpc/auth_gss.h>
45#include <linux/sunrpc/svcauth.h>
46#include <linux/sunrpc/gss_err.h> 45#include <linux/sunrpc/gss_err.h>
47#include <linux/sunrpc/svcauth.h> 46#include <linux/sunrpc/svcauth.h>
48#include <linux/sunrpc/svcauth_gss.h> 47#include <linux/sunrpc/svcauth_gss.h>
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 5d2b9ce84d0a..76088153524c 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -41,7 +41,6 @@
41#include "addr.h" 41#include "addr.h"
42#include "link.h" 42#include "link.h"
43#include "node.h" 43#include "node.h"
44#include "port.h"
45#include "name_table.h" 44#include "name_table.h"
46#include "user_reg.h" 45#include "user_reg.h"
47#include "msg.h" 46#include "msg.h"
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index e5a3be03aa0d..7012891d39f2 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -23,10 +23,9 @@
23#include <linux/netfilter.h> 23#include <linux/netfilter.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/cache.h> 25#include <linux/cache.h>
26#include <linux/audit.h>
26#include <net/xfrm.h> 27#include <net/xfrm.h>
27#include <net/ip.h> 28#include <net/ip.h>
28#include <linux/audit.h>
29#include <linux/cache.h>
30 29
31#include "xfrm_hash.h" 30#include "xfrm_hash.h"
32 31
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 31be405efb55..d4356e6f7f9b 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -19,9 +19,8 @@
19#include <linux/ipsec.h> 19#include <linux/ipsec.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/cache.h> 21#include <linux/cache.h>
22#include <asm/uaccess.h>
23#include <linux/audit.h> 22#include <linux/audit.h>
24#include <linux/cache.h> 23#include <asm/uaccess.h>
25 24
26#include "xfrm_hash.h" 25#include "xfrm_hash.h"
27 26