aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-17 17:33:11 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-17 17:33:11 -0400
commit9cbc94eabb0791906051bbfac024ef2c2be8e079 (patch)
tree41ba194e687c6c60f5c883f98737ac83257d0c00 /net
parent1d1652cbdb9885e4d73972263e4cdbe1b0beebfe (diff)
parent7cc31a9ae1477abc79d5992b3afe889f25c50c99 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/vmxnet3/vmxnet3_ethtool.c net/core/dev.c
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_netfilter.c2
-rw-r--r--net/core/dev.c26
-rw-r--r--net/core/ethtool.c2
-rw-r--r--net/mac80211/tx.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_app.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c6
-rw-r--r--net/netfilter/nf_conntrack_sip.c16
-rw-r--r--net/socket.c6
9 files changed, 38 insertions, 30 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 5614907525e1..e1f5ec75e91c 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -737,7 +737,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
737 nf_bridge->mask |= BRNF_PKT_TYPE; 737 nf_bridge->mask |= BRNF_PKT_TYPE;
738 } 738 }
739 739
740 if (br_parse_ip_options(skb)) 740 if (pf == PF_INET && br_parse_ip_options(skb))
741 return NF_DROP; 741 return NF_DROP;
742 742
743 /* The physdev module checks on this */ 743 /* The physdev module checks on this */
diff --git a/net/core/dev.c b/net/core/dev.c
index 3ed09f8ecbf8..155de2094e71 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1007,7 +1007,7 @@ rollback:
1007 } 1007 }
1008 1008
1009 write_lock_bh(&dev_base_lock); 1009 write_lock_bh(&dev_base_lock);
1010 hlist_del(&dev->name_hlist); 1010 hlist_del_rcu(&dev->name_hlist);
1011 write_unlock_bh(&dev_base_lock); 1011 write_unlock_bh(&dev_base_lock);
1012 1012
1013 synchronize_rcu(); 1013 synchronize_rcu();
@@ -5196,27 +5196,27 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
5196 /* Fix illegal checksum combinations */ 5196 /* Fix illegal checksum combinations */
5197 if ((features & NETIF_F_HW_CSUM) && 5197 if ((features & NETIF_F_HW_CSUM) &&
5198 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { 5198 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5199 netdev_info(dev, "mixed HW and IP checksum settings.\n"); 5199 netdev_warn(dev, "mixed HW and IP checksum settings.\n");
5200 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM); 5200 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
5201 } 5201 }
5202 5202
5203 if ((features & NETIF_F_NO_CSUM) && 5203 if ((features & NETIF_F_NO_CSUM) &&
5204 (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { 5204 (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5205 netdev_info(dev, "mixed no checksumming and other settings.\n"); 5205 netdev_warn(dev, "mixed no checksumming and other settings.\n");
5206 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM); 5206 features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM|NETIF_F_HW_CSUM);
5207 } 5207 }
5208 5208
5209 /* Fix illegal SG+CSUM combinations. */ 5209 /* Fix illegal SG+CSUM combinations. */
5210 if ((features & NETIF_F_SG) && 5210 if ((features & NETIF_F_SG) &&
5211 !(features & NETIF_F_ALL_CSUM)) { 5211 !(features & NETIF_F_ALL_CSUM)) {
5212 netdev_info(dev, 5212 netdev_dbg(dev,
5213 "Dropping NETIF_F_SG since no checksum feature.\n"); 5213 "Dropping NETIF_F_SG since no checksum feature.\n");
5214 features &= ~NETIF_F_SG; 5214 features &= ~NETIF_F_SG;
5215 } 5215 }
5216 5216
5217 /* TSO requires that SG is present as well. */ 5217 /* TSO requires that SG is present as well. */
5218 if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) { 5218 if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {
5219 netdev_info(dev, "Dropping TSO features since no SG feature.\n"); 5219 netdev_dbg(dev, "Dropping TSO features since no SG feature.\n");
5220 features &= ~NETIF_F_ALL_TSO; 5220 features &= ~NETIF_F_ALL_TSO;
5221 } 5221 }
5222 5222
@@ -5226,7 +5226,7 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
5226 5226
5227 /* Software GSO depends on SG. */ 5227 /* Software GSO depends on SG. */
5228 if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) { 5228 if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
5229 netdev_info(dev, "Dropping NETIF_F_GSO since no SG feature.\n"); 5229 netdev_dbg(dev, "Dropping NETIF_F_GSO since no SG feature.\n");
5230 features &= ~NETIF_F_GSO; 5230 features &= ~NETIF_F_GSO;
5231 } 5231 }
5232 5232
@@ -5236,13 +5236,13 @@ u32 netdev_fix_features(struct net_device *dev, u32 features)
5236 if (!((features & NETIF_F_GEN_CSUM) || 5236 if (!((features & NETIF_F_GEN_CSUM) ||
5237 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM)) 5237 (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))
5238 == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) { 5238 == (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
5239 netdev_info(dev, 5239 netdev_dbg(dev,
5240 "Dropping NETIF_F_UFO since no checksum offload features.\n"); 5240 "Dropping NETIF_F_UFO since no checksum offload features.\n");
5241 features &= ~NETIF_F_UFO; 5241 features &= ~NETIF_F_UFO;
5242 } 5242 }
5243 5243
5244 if (!(features & NETIF_F_SG)) { 5244 if (!(features & NETIF_F_SG)) {
5245 netdev_info(dev, 5245 netdev_dbg(dev,
5246 "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n"); 5246 "Dropping NETIF_F_UFO since no NETIF_F_SG feature.\n");
5247 features &= ~NETIF_F_UFO; 5247 features &= ~NETIF_F_UFO;
5248 } 5248 }
@@ -5270,7 +5270,7 @@ int __netdev_update_features(struct net_device *dev)
5270 if (dev->features == features) 5270 if (dev->features == features)
5271 return 0; 5271 return 0;
5272 5272
5273 netdev_info(dev, "Features changed: 0x%08x -> 0x%08x\n", 5273 netdev_dbg(dev, "Features changed: 0x%08x -> 0x%08x\n",
5274 dev->features, features); 5274 dev->features, features);
5275 5275
5276 if (dev->netdev_ops->ndo_set_features) 5276 if (dev->netdev_ops->ndo_set_features)
@@ -5462,12 +5462,6 @@ int register_netdevice(struct net_device *dev)
5462 dev->features |= NETIF_F_SOFT_FEATURES; 5462 dev->features |= NETIF_F_SOFT_FEATURES;
5463 dev->wanted_features = dev->features & dev->hw_features; 5463 dev->wanted_features = dev->features & dev->hw_features;
5464 5464
5465 /* Avoid warning from netdev_fix_features() for GSO without SG */
5466 if (!(dev->wanted_features & NETIF_F_SG)) {
5467 dev->wanted_features &= ~NETIF_F_GSO;
5468 dev->features &= ~NETIF_F_GSO;
5469 }
5470
5471 /* Turn on no cache copy if HW is doing checksum */ 5465 /* Turn on no cache copy if HW is doing checksum */
5472 dev->hw_features |= NETIF_F_NOCACHE_COPY; 5466 dev->hw_features |= NETIF_F_NOCACHE_COPY;
5473 if ((dev->features & NETIF_F_ALL_CSUM) && 5467 if ((dev->features & NETIF_F_ALL_CSUM) &&
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index b8c2bcfee6af..84e7304532e6 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -332,7 +332,7 @@ static const char netdev_features_strings[ETHTOOL_DEV_FEATURE_WORDS * 32][ETH_GS
332 /* NETIF_F_IP_CSUM */ "tx-checksum-ipv4", 332 /* NETIF_F_IP_CSUM */ "tx-checksum-ipv4",
333 /* NETIF_F_NO_CSUM */ "tx-checksum-unneeded", 333 /* NETIF_F_NO_CSUM */ "tx-checksum-unneeded",
334 /* NETIF_F_HW_CSUM */ "tx-checksum-ip-generic", 334 /* NETIF_F_HW_CSUM */ "tx-checksum-ip-generic",
335 /* NETIF_F_IPV6_CSUM */ "tx_checksum-ipv6", 335 /* NETIF_F_IPV6_CSUM */ "tx-checksum-ipv6",
336 /* NETIF_F_HIGHDMA */ "highdma", 336 /* NETIF_F_HIGHDMA */ "highdma",
337 /* NETIF_F_FRAGLIST */ "tx-scatter-gather-fraglist", 337 /* NETIF_F_FRAGLIST */ "tx-scatter-gather-fraglist",
338 /* NETIF_F_HW_VLAN_TX */ "tx-vlan-hw-insert", 338 /* NETIF_F_HW_VLAN_TX */ "tx-vlan-hw-insert",
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 6eeaaa2bbafe..64e0f7587e6d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -237,6 +237,10 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
237 &local->dynamic_ps_disable_work); 237 &local->dynamic_ps_disable_work);
238 } 238 }
239 239
240 /* Don't restart the timer if we're not disassociated */
241 if (!ifmgd->associated)
242 return TX_CONTINUE;
243
240 mod_timer(&local->dynamic_ps_timer, jiffies + 244 mod_timer(&local->dynamic_ps_timer, jiffies +
241 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); 245 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
242 246
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c
index 51f3af7c4743..059af3120be7 100644
--- a/net/netfilter/ipvs/ip_vs_app.c
+++ b/net/netfilter/ipvs/ip_vs_app.c
@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = {
572 .open = ip_vs_app_open, 572 .open = ip_vs_app_open,
573 .read = seq_read, 573 .read = seq_read,
574 .llseek = seq_lseek, 574 .llseek = seq_lseek,
575 .release = seq_release, 575 .release = seq_release_net,
576}; 576};
577#endif 577#endif
578 578
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index d3fd91bbba49..bf28ac2fc99b 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = {
1046 .open = ip_vs_conn_open, 1046 .open = ip_vs_conn_open,
1047 .read = seq_read, 1047 .read = seq_read,
1048 .llseek = seq_lseek, 1048 .llseek = seq_lseek,
1049 .release = seq_release, 1049 .release = seq_release_net,
1050}; 1050};
1051 1051
1052static const char *ip_vs_origin_name(unsigned flags) 1052static const char *ip_vs_origin_name(unsigned flags)
@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = {
1114 .open = ip_vs_conn_sync_open, 1114 .open = ip_vs_conn_sync_open,
1115 .read = seq_read, 1115 .read = seq_read,
1116 .llseek = seq_lseek, 1116 .llseek = seq_lseek,
1117 .release = seq_release, 1117 .release = seq_release_net,
1118}; 1118};
1119 1119
1120#endif 1120#endif
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 89842f06931d..699c79a55657 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = {
2066 .open = ip_vs_info_open, 2066 .open = ip_vs_info_open,
2067 .read = seq_read, 2067 .read = seq_read,
2068 .llseek = seq_lseek, 2068 .llseek = seq_lseek,
2069 .release = seq_release_private, 2069 .release = seq_release_net,
2070}; 2070};
2071 2071
2072static int ip_vs_stats_show(struct seq_file *seq, void *v) 2072static int ip_vs_stats_show(struct seq_file *seq, void *v)
@@ -2106,7 +2106,7 @@ static const struct file_operations ip_vs_stats_fops = {
2106 .open = ip_vs_stats_seq_open, 2106 .open = ip_vs_stats_seq_open,
2107 .read = seq_read, 2107 .read = seq_read,
2108 .llseek = seq_lseek, 2108 .llseek = seq_lseek,
2109 .release = single_release, 2109 .release = single_release_net,
2110}; 2110};
2111 2111
2112static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v) 2112static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v)
@@ -2175,7 +2175,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
2175 .open = ip_vs_stats_percpu_seq_open, 2175 .open = ip_vs_stats_percpu_seq_open,
2176 .read = seq_read, 2176 .read = seq_read,
2177 .llseek = seq_lseek, 2177 .llseek = seq_lseek,
2178 .release = single_release, 2178 .release = single_release_net,
2179}; 2179};
2180#endif 2180#endif
2181 2181
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 237cc1981b89..cb5a28581782 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -1419,6 +1419,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
1419 const char *dptr, *end; 1419 const char *dptr, *end;
1420 s16 diff, tdiff = 0; 1420 s16 diff, tdiff = 0;
1421 int ret = NF_ACCEPT; 1421 int ret = NF_ACCEPT;
1422 bool term;
1422 typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust; 1423 typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust;
1423 1424
1424 if (ctinfo != IP_CT_ESTABLISHED && 1425 if (ctinfo != IP_CT_ESTABLISHED &&
@@ -1453,14 +1454,21 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff,
1453 if (dptr + matchoff == end) 1454 if (dptr + matchoff == end)
1454 break; 1455 break;
1455 1456
1456 if (end + strlen("\r\n\r\n") > dptr + datalen) 1457 term = false;
1457 break; 1458 for (; end + strlen("\r\n\r\n") <= dptr + datalen; end++) {
1458 if (end[0] != '\r' || end[1] != '\n' || 1459 if (end[0] == '\r' && end[1] == '\n' &&
1459 end[2] != '\r' || end[3] != '\n') 1460 end[2] == '\r' && end[3] == '\n') {
1461 term = true;
1462 break;
1463 }
1464 }
1465 if (!term)
1460 break; 1466 break;
1461 end += strlen("\r\n\r\n") + clen; 1467 end += strlen("\r\n\r\n") + clen;
1462 1468
1463 msglen = origlen = end - dptr; 1469 msglen = origlen = end - dptr;
1470 if (msglen > datalen)
1471 return NF_DROP;
1464 1472
1465 ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen); 1473 ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen);
1466 if (ret != NF_ACCEPT) 1474 if (ret != NF_ACCEPT)
diff --git a/net/socket.c b/net/socket.c
index ed50255143d5..2d5382d0de54 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2232,14 +2232,16 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
2232 */ 2232 */
2233 if (MSG_CMSG_COMPAT & flags) { 2233 if (MSG_CMSG_COMPAT & flags) {
2234 err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, 2234 err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry,
2235 &msg_sys, flags, datagrams); 2235 &msg_sys, flags & ~MSG_WAITFORONE,
2236 datagrams);
2236 if (err < 0) 2237 if (err < 0)
2237 break; 2238 break;
2238 err = __put_user(err, &compat_entry->msg_len); 2239 err = __put_user(err, &compat_entry->msg_len);
2239 ++compat_entry; 2240 ++compat_entry;
2240 } else { 2241 } else {
2241 err = __sys_recvmsg(sock, (struct msghdr __user *)entry, 2242 err = __sys_recvmsg(sock, (struct msghdr __user *)entry,
2242 &msg_sys, flags, datagrams); 2243 &msg_sys, flags & ~MSG_WAITFORONE,
2244 datagrams);
2243 if (err < 0) 2245 if (err < 0)
2244 break; 2246 break;
2245 err = put_user(err, &entry->msg_len); 2247 err = put_user(err, &entry->msg_len);