aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-14 21:33:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-14 21:33:54 -0400
commita376d446771710790f5f3425172b467bf8578e22 (patch)
tree64dd36bcb3df9a4d76d31900f1967b0cc302254e /net
parent6847e154e3cd74fca6084124c097980a7634285a (diff)
parent252aa9d94a04252046f3a382e6aca1b5c95921d8 (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: Revert "NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines." skbuff.h: Fix comment for NET_IP_ALIGN drivers/net: using spin_lock_irqsave() in net_send_packet() NET: phy_device, fix lock imbalance gre: fix ToS/DiffServ inherit bug igb: gcc-3.4.6 fix atlx: duplicate testing of MCAST flag NET: Fix locking issues in PPP, 6pack, mkiss and strip line disciplines. netdev: restore MTU change operation netdev: restore MAC address set and validate operations sit: fix regression: do not release skb->dst before xmit net: ip_push_pending_frames() fix net: sk_prot_alloc() should not blindly overwrite memory
Diffstat (limited to 'net')
-rw-r--r--net/core/sock.c19
-rw-r--r--net/ipv4/ip_gre.c4
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv6/ip6_output.c1
-rw-r--r--net/ipv6/sit.c1
5 files changed, 20 insertions, 6 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 6354863b1c68..ba5d2116aea1 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -939,8 +939,23 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
939 struct kmem_cache *slab; 939 struct kmem_cache *slab;
940 940
941 slab = prot->slab; 941 slab = prot->slab;
942 if (slab != NULL) 942 if (slab != NULL) {
943 sk = kmem_cache_alloc(slab, priority); 943 sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO);
944 if (!sk)
945 return sk;
946 if (priority & __GFP_ZERO) {
947 /*
948 * caches using SLAB_DESTROY_BY_RCU should let
949 * sk_node.next un-modified. Special care is taken
950 * when initializing object to zero.
951 */
952 if (offsetof(struct sock, sk_node.next) != 0)
953 memset(sk, 0, offsetof(struct sock, sk_node.next));
954 memset(&sk->sk_node.pprev, 0,
955 prot->obj_size - offsetof(struct sock,
956 sk_node.pprev));
957 }
958 }
944 else 959 else
945 sk = kmalloc(prot->obj_size, priority); 960 sk = kmalloc(prot->obj_size, priority);
946 961
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 44e2a3d2359a..cb4a0f4bd5e5 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -735,10 +735,10 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
735 } 735 }
736 736
737 tos = tiph->tos; 737 tos = tiph->tos;
738 if (tos&1) { 738 if (tos == 1) {
739 tos = 0;
739 if (skb->protocol == htons(ETH_P_IP)) 740 if (skb->protocol == htons(ETH_P_IP))
740 tos = old_iph->tos; 741 tos = old_iph->tos;
741 tos &= ~1;
742 } 742 }
743 743
744 { 744 {
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 247026282669..7d0821054729 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1243,7 +1243,6 @@ int ip_push_pending_frames(struct sock *sk)
1243 skb->len += tmp_skb->len; 1243 skb->len += tmp_skb->len;
1244 skb->data_len += tmp_skb->len; 1244 skb->data_len += tmp_skb->len;
1245 skb->truesize += tmp_skb->truesize; 1245 skb->truesize += tmp_skb->truesize;
1246 __sock_put(tmp_skb->sk);
1247 tmp_skb->destructor = NULL; 1246 tmp_skb->destructor = NULL;
1248 tmp_skb->sk = NULL; 1247 tmp_skb->sk = NULL;
1249 } 1248 }
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7c76e3d18215..87f8419a68fd 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1484,7 +1484,6 @@ int ip6_push_pending_frames(struct sock *sk)
1484 skb->len += tmp_skb->len; 1484 skb->len += tmp_skb->len;
1485 skb->data_len += tmp_skb->len; 1485 skb->data_len += tmp_skb->len;
1486 skb->truesize += tmp_skb->truesize; 1486 skb->truesize += tmp_skb->truesize;
1487 __sock_put(tmp_skb->sk);
1488 tmp_skb->destructor = NULL; 1487 tmp_skb->destructor = NULL;
1489 tmp_skb->sk = NULL; 1488 tmp_skb->sk = NULL;
1490 } 1489 }
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 68e52308e552..98b7327d0949 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1018,6 +1018,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
1018 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); 1018 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
1019 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr); 1019 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr);
1020 dev->flags = IFF_NOARP; 1020 dev->flags = IFF_NOARP;
1021 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
1021 dev->iflink = 0; 1022 dev->iflink = 0;
1022 dev->addr_len = 4; 1023 dev->addr_len = 4;
1023 dev->features |= NETIF_F_NETNS_LOCAL; 1024 dev->features |= NETIF_F_NETNS_LOCAL;