aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/atm/lec.c1
-rw-r--r--net/ax25/ax25_iface.c2
-rw-r--r--net/bridge/br_device.c2
-rw-r--r--net/bridge/br_if.c36
-rw-r--r--net/bridge/br_stp_if.c2
-rw-r--r--net/bridge/br_sysfs_br.c24
-rw-r--r--net/core/dev.c39
-rw-r--r--net/core/ethtool.c1
-rw-r--r--net/dccp/ccid.c1
-rw-r--r--net/dccp/feat.c14
-rw-r--r--net/econet/af_econet.c3
-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/ipv4/netfilter/nf_nat_sip.c2
-rw-r--r--net/ipv6/tcp_ipv6.c1
-rw-r--r--net/netfilter/nf_conntrack_sip.c8
-rw-r--r--net/netfilter/xt_u32.c2
-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
25 files changed, 89 insertions, 71 deletions
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index c0040c9064a1..bd08aa090763 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -319,7 +319,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
319 static const char fmt[] = "%30s %12lu\n"; 319 static const char fmt[] = "%30s %12lu\n";
320 int i; 320 int i;
321 321
322 if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN))) 322 if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
323 return 0; 323 return 0;
324 324
325 seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", 325 seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
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/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 16be0c14780a..8443af57a374 100644
--- a/net/ax25/ax25_iface.c
+++ b/net/ax25/ax25_iface.c
@@ -69,7 +69,6 @@ void ax25_protocol_release(unsigned int pid)
69 if (protocol->pid == pid) { 69 if (protocol->pid == pid) {
70 protocol_list = protocol->next; 70 protocol_list = protocol->next;
71 write_unlock_bh(&protocol_list_lock); 71 write_unlock_bh(&protocol_list_lock);
72 kfree(protocol);
73 return; 72 return;
74 } 73 }
75 74
@@ -78,7 +77,6 @@ void ax25_protocol_release(unsigned int pid)
78 s = protocol->next; 77 s = protocol->next;
79 protocol->next = protocol->next->next; 78 protocol->next = protocol->next->next;
80 write_unlock_bh(&protocol_list_lock); 79 write_unlock_bh(&protocol_list_lock);
81 kfree(s);
82 return; 80 return;
83 } 81 }
84 82
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/bridge/br_stp_if.c b/net/bridge/br_stp_if.c
index 1ea2f86f7683..1a430eccec9b 100644
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -132,7 +132,7 @@ static void br_stp_start(struct net_bridge *br)
132 } else { 132 } else {
133 br->stp_enabled = BR_KERNEL_STP; 133 br->stp_enabled = BR_KERNEL_STP;
134 printk(KERN_INFO "%s: starting userspace STP failed, " 134 printk(KERN_INFO "%s: starting userspace STP failed, "
135 "staring kernel STP\n", br->dev->name); 135 "starting kernel STP\n", br->dev->name);
136 136
137 /* To start timers on any ports left in blocking */ 137 /* To start timers on any ports left in blocking */
138 spin_lock_bh(&br->lock); 138 spin_lock_bh(&br->lock);
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 4f42263e0a8a..88f43003b193 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -147,20 +147,26 @@ static ssize_t show_stp_state(struct device *d,
147 return sprintf(buf, "%d\n", br->stp_enabled); 147 return sprintf(buf, "%d\n", br->stp_enabled);
148} 148}
149 149
150static void set_stp_state(struct net_bridge *br, unsigned long val)
151{
152 rtnl_lock();
153 spin_unlock_bh(&br->lock);
154 br_stp_set_enabled(br, val);
155 spin_lock_bh(&br->lock);
156 rtnl_unlock();
157}
158 150
159static ssize_t store_stp_state(struct device *d, 151static ssize_t store_stp_state(struct device *d,
160 struct device_attribute *attr, const char *buf, 152 struct device_attribute *attr, const char *buf,
161 size_t len) 153 size_t len)
162{ 154{
163 return store_bridge_parm(d, buf, len, set_stp_state); 155 struct net_bridge *br = to_bridge(d);
156 char *endp;
157 unsigned long val;
158
159 if (!capable(CAP_NET_ADMIN))
160 return -EPERM;
161
162 val = simple_strtoul(buf, &endp, 0);
163 if (endp == buf)
164 return -EINVAL;
165
166 rtnl_lock();
167 br_stp_set_enabled(br, val);
168 rtnl_unlock();
169
164} 170}
165static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state, 171static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state,
166 store_stp_state); 172 store_stp_state);
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/core/ethtool.c b/net/core/ethtool.c
index 2ab0a60046a5..c5e059352d43 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -948,7 +948,6 @@ int dev_ethtool(struct ifreq *ifr)
948 return rc; 948 return rc;
949} 949}
950 950
951EXPORT_SYMBOL(dev_ethtool);
952EXPORT_SYMBOL(ethtool_op_get_link); 951EXPORT_SYMBOL(ethtool_op_get_link);
953EXPORT_SYMBOL(ethtool_op_get_sg); 952EXPORT_SYMBOL(ethtool_op_get_sg);
954EXPORT_SYMBOL(ethtool_op_get_tso); 953EXPORT_SYMBOL(ethtool_op_get_tso);
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/econet/af_econet.c b/net/econet/af_econet.c
index b5524f32ac2d..35c96bcc0f32 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -1146,6 +1146,9 @@ static void __exit econet_proto_exit(void)
1146 sock_release(udpsock); 1146 sock_release(udpsock);
1147#endif 1147#endif
1148 unregister_netdevice_notifier(&econet_netdev_notifier); 1148 unregister_netdevice_notifier(&econet_netdev_notifier);
1149#ifdef CONFIG_ECONET_NATIVE
1150 dev_remove_pack(&econet_packet_type);
1151#endif
1149 sock_unregister(econet_family_ops.family); 1152 sock_unregister(econet_family_ops.family);
1150 proto_unregister(&econet_proto); 1153 proto_unregister(&econet_proto);
1151} 1154}
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/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index a889ec3ec83a..e14d41976c27 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -104,7 +104,7 @@ static unsigned int ip_nat_sip(struct sk_buff **pskb,
104 dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr); 104 dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr);
105 datalen = (*pskb)->len - dataoff; 105 datalen = (*pskb)->len - dataoff;
106 if (datalen < sizeof("SIP/2.0") - 1) 106 if (datalen < sizeof("SIP/2.0") - 1)
107 return NF_DROP; 107 return NF_ACCEPT;
108 108
109 addr_map_init(ct, &map); 109 addr_map_init(ct, &map);
110 110
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/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 1276a442f10c..d449fa47491c 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr,
295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, 295static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
296 const char *limit, int *shift) 296 const char *limit, int *shift)
297{ 297{
298 const char *start = dptr;
298 int s = *shift; 299 int s = *shift;
299 300
300 /* Search for @, but stop at the end of the line. 301 /* Search for @, but stop at the end of the line.
@@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
309 if (dptr <= limit && *dptr == '@') { 310 if (dptr <= limit && *dptr == '@') {
310 dptr++; 311 dptr++;
311 (*shift)++; 312 (*shift)++;
312 } else 313 } else {
314 dptr = start;
313 *shift = s; 315 *shift = s;
316 }
314 317
315 return epaddr_len(ct, dptr, limit, shift); 318 return epaddr_len(ct, dptr, limit, shift);
316} 319}
@@ -330,7 +333,8 @@ int ct_sip_get_info(struct nf_conn *ct,
330 333
331 while (dptr <= limit) { 334 while (dptr <= limit) {
332 if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && 335 if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) &&
333 (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { 336 (hnfo->sname == NULL ||
337 strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
334 dptr++; 338 dptr++;
335 continue; 339 continue;
336 } 340 }
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index 74f9b14c012f..bec427915b30 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data,
36 at = 0; 36 at = 0;
37 pos = ct->location[0].number; 37 pos = ct->location[0].number;
38 38
39 if (skb->len < 4 || pos > skb->len - 4); 39 if (skb->len < 4 || pos > skb->len - 4)
40 return false; 40 return false;
41 41
42 ret = skb_copy_bits(skb, pos, &n, sizeof(n)); 42 ret = skb_copy_bits(skb, pos, &n, sizeof(n));
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