From: Greg Kroah-Hartman Date: Thu, 3 Nov 2011 17:39:52 +0000 (-0700) Subject: 3.1 patches X-Git-Tag: v3.0.9~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2931d9bf38bfaa3e4a769754aa50d1b83c32d0b3;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches --- diff --git a/queue-3.1/ipv4-fix-ipsec-forward-performance-regression.patch b/queue-3.1/ipv4-fix-ipsec-forward-performance-regression.patch new file mode 100644 index 00000000000..195e041000c --- /dev/null +++ b/queue-3.1/ipv4-fix-ipsec-forward-performance-regression.patch @@ -0,0 +1,45 @@ +From 0d3d3ede6f6f45686e154f6d13685e03f6eba721 Mon Sep 17 00:00:00 2001 +From: "Yan, Zheng" +Date: Sat, 22 Oct 2011 21:58:20 +0000 +Subject: ipv4: fix ipsec forward performance regression + + +From: "Yan, Zheng" + +[ Upstream commit b73233960a59ee66e09d642f13d0592b13651e94 ] + +There is bug in commit 5e2b61f(ipv4: Remove flowi from struct rtable). +It makes xfrm4_fill_dst() modify wrong data structure. + +Signed-off-by: Zheng Yan +Reported-by: Kim Phillips +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/xfrm4_policy.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/net/ipv4/xfrm4_policy.c ++++ b/net/ipv4/xfrm4_policy.c +@@ -79,13 +79,13 @@ static int xfrm4_fill_dst(struct xfrm_ds + struct rtable *rt = (struct rtable *)xdst->route; + const struct flowi4 *fl4 = &fl->u.ip4; + +- rt->rt_key_dst = fl4->daddr; +- rt->rt_key_src = fl4->saddr; +- rt->rt_key_tos = fl4->flowi4_tos; +- rt->rt_route_iif = fl4->flowi4_iif; +- rt->rt_iif = fl4->flowi4_iif; +- rt->rt_oif = fl4->flowi4_oif; +- rt->rt_mark = fl4->flowi4_mark; ++ xdst->u.rt.rt_key_dst = fl4->daddr; ++ xdst->u.rt.rt_key_src = fl4->saddr; ++ xdst->u.rt.rt_key_tos = fl4->flowi4_tos; ++ xdst->u.rt.rt_route_iif = fl4->flowi4_iif; ++ xdst->u.rt.rt_iif = fl4->flowi4_iif; ++ xdst->u.rt.rt_oif = fl4->flowi4_oif; ++ xdst->u.rt.rt_mark = fl4->flowi4_mark; + + xdst->u.dst.dev = dev; + dev_hold(dev); diff --git a/queue-3.1/ipv6-fix-route-error-binding-peer-in-func-icmp6_dst_alloc.patch b/queue-3.1/ipv6-fix-route-error-binding-peer-in-func-icmp6_dst_alloc.patch new file mode 100644 index 00000000000..58d3ec619bf --- /dev/null +++ b/queue-3.1/ipv6-fix-route-error-binding-peer-in-func-icmp6_dst_alloc.patch @@ -0,0 +1,36 @@ +From 7b8bc677efd2ce23df95a277f4f95d909aec310e Mon Sep 17 00:00:00 2001 +From: Gao feng +Date: Fri, 28 Oct 2011 02:46:57 +0000 +Subject: ipv6: fix route error binding peer in func icmp6_dst_alloc + + +From: Gao feng + +[ Upstream commit 7011687f0f2f12cc348f6a693fafe63d89167eac ] + +in func icmp6_dst_alloc,dst_metric_set call ipv6_cow_metrics to set metric. +ipv6_cow_metrics may will call rt6_bind_peer to set rt6_info->rt6i_peer. +So,we should move ipv6_addr_copy before dst_metric_set to make sure rt6_bind_peer success. + +Signed-off-by: Gao feng +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv6/route.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/net/ipv6/route.c ++++ b/net/ipv6/route.c +@@ -1086,11 +1086,10 @@ struct dst_entry *icmp6_dst_alloc(struct + rt->dst.output = ip6_output; + dst_set_neighbour(&rt->dst, neigh); + atomic_set(&rt->dst.__refcnt, 1); +- dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); +- + ipv6_addr_copy(&rt->rt6i_dst.addr, addr); + rt->rt6i_dst.plen = 128; + rt->rt6i_idev = idev; ++ dst_metric_set(&rt->dst, RTAX_HOPLIMIT, 255); + + spin_lock_bh(&icmp6_dst_lock); + rt->dst.next = icmp6_dst_gc_list; diff --git a/queue-3.1/series b/queue-3.1/series index 8b73f61433b..3140cd56a5f 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -155,3 +155,6 @@ readlinkat-ensure-we-return-enoent-for-the-empty-pathname-for-normal-lookups.pat um-fix-kmalloc-argument-order-in-um-vdso-vma.c.patch omap-spi-fix-the-trying-to-free-nonexistent-resource-error.patch jsm-remove-buggy-write-queue.patch +ipv4-fix-ipsec-forward-performance-regression.patch +ipv6-fix-route-error-binding-peer-in-func-icmp6_dst_alloc.patch +tg3-fix-tigon3_dma_hwbug_workaround.patch diff --git a/queue-3.1/tg3-fix-tigon3_dma_hwbug_workaround.patch b/queue-3.1/tg3-fix-tigon3_dma_hwbug_workaround.patch new file mode 100644 index 00000000000..968f9d1c8be --- /dev/null +++ b/queue-3.1/tg3-fix-tigon3_dma_hwbug_workaround.patch @@ -0,0 +1,60 @@ +From 22a5aa41cb1a2077373a47a3361f628ec3c86589 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Sat, 22 Oct 2011 03:29:53 -0400 +Subject: tg3: fix tigon3_dma_hwbug_workaround() + + +From: Eric Dumazet + +[ Upstream commit f7ff19871bb4a3451e1ca2cf660bf633018cfbec ] + +Ari got kernel panics using tg3 NIC, and bisected to 2669069aacc9 "tg3: +enable transmit time stamping." + +This is because tigon3_dma_hwbug_workaround() might alloc a new skb and +free the original. We panic when skb_tx_timestamp() is called on freed +skb. + +Reported-by: Ari Savolainen +Signed-off-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/tg3.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/tg3.c ++++ b/drivers/net/tg3.c +@@ -6029,12 +6029,12 @@ static void tg3_tx_skb_unmap(struct tg3_ + + /* Workaround 4GB and 40-bit hardware DMA bugs. */ + static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, +- struct sk_buff *skb, ++ struct sk_buff **pskb, + u32 *entry, u32 *budget, + u32 base_flags, u32 mss, u32 vlan) + { + struct tg3 *tp = tnapi->tp; +- struct sk_buff *new_skb; ++ struct sk_buff *new_skb, *skb = *pskb; + dma_addr_t new_addr = 0; + int ret = 0; + +@@ -6076,7 +6076,7 @@ static int tigon3_dma_hwbug_workaround(s + } + + dev_kfree_skb(skb); +- ++ *pskb = new_skb; + return ret; + } + +@@ -6305,7 +6305,7 @@ static netdev_tx_t tg3_start_xmit(struct + */ + entry = tnapi->tx_prod; + budget = tg3_tx_avail(tnapi); +- if (tigon3_dma_hwbug_workaround(tnapi, skb, &entry, &budget, ++ if (tigon3_dma_hwbug_workaround(tnapi, &skb, &entry, &budget, + base_flags, mss, vlan)) + goto out_unlock; + }