diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-06-20 14:03:23 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-06-20 14:03:23 -0400 |
commit | 826903bbb721bd267fab8d3b915147b5d6fcb31f (patch) | |
tree | 647bfb2cc83a31bcacb440979de0f72bf17a00df | |
parent | 59f6536f6e554a08451d5f0f3e2b8c35e3f76e89 (diff) | |
download | longterm-queue-2.6.34-826903bbb721bd267fab8d3b915147b5d6fcb31f.tar.gz |
add udp fix upstream 26cde9f7e2747b6d
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/series | 1 | ||||
-rw-r--r-- | queue/udp-Fix-bogus-UFO-packet-generation.patch | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/queue/series b/queue/series index d5a05ca..1fec6b5 100644 --- a/queue/series +++ b/queue/series @@ -237,6 +237,7 @@ PCI-return-correct-value-when-writing-to-the-reset-a.patch mpt2sas-prevent-heap-overflows-and-unchecked-reads.patch fs-partitions-ldm.c-fix-oops-caused-by-corrupted-par.patch agp-fix-arbitrary-kernel-memory-writes.patch +udp-Fix-bogus-UFO-packet-generation.patch # Content taken from v2.6.35.11 arch-x86-oprofile-op_model_amd.c-Perform-initialisat.patch diff --git a/queue/udp-Fix-bogus-UFO-packet-generation.patch b/queue/udp-Fix-bogus-UFO-packet-generation.patch new file mode 100644 index 0000000..b395c05 --- /dev/null +++ b/queue/udp-Fix-bogus-UFO-packet-generation.patch @@ -0,0 +1,58 @@ +From 7b735ffdb34845df9ec134301eb39a26b43baac3 Mon Sep 17 00:00:00 2001 +From: Herbert Xu <herbert@gondor.apana.org.au> +Date: Tue, 15 Jun 2010 01:52:25 +0000 +Subject: [PATCH] udp: Fix bogus UFO packet generation + +commit 26cde9f7e2747b6d254b704594eed87ab959afa5 upstream. + +It has been reported that the new UFO software fallback path +fails under certain conditions with NFS. I tracked the problem +down to the generation of UFO packets that are smaller than the +MTU. The software fallback path simply discards these packets. + +This patch fixes the problem by not generating such packets on +the UFO path. + +Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> +Reviewed-by: Michael S. Tsirkin <mst@redhat.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c +index e8a6860..d52fe4b 100644 +--- a/net/ipv4/ip_output.c ++++ b/net/ipv4/ip_output.c +@@ -871,8 +871,10 @@ int ip_append_data(struct sock *sk, + !exthdrlen) + csummode = CHECKSUM_PARTIAL; + ++ skb = skb_peek_tail(&sk->sk_write_queue); ++ + inet->cork.length += length; +- if (((length> mtu) || !skb_queue_empty(&sk->sk_write_queue)) && ++ if (((length > mtu) || (skb && skb_is_gso(skb))) && + (sk->sk_protocol == IPPROTO_UDP) && + (rt->u.dst.dev->features & NETIF_F_UFO)) { + err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, +@@ -890,7 +892,7 @@ int ip_append_data(struct sock *sk, + * adding appropriate IP header. + */ + +- if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) ++ if (!skb) + goto alloc_new_skb; + + while (length > 0) { +@@ -1119,7 +1121,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, + return -EINVAL; + + inet->cork.length += size; +- if ((sk->sk_protocol == IPPROTO_UDP) && ++ if ((size + skb->len > mtu) && ++ (sk->sk_protocol == IPPROTO_UDP) && + (rt->u.dst.dev->features & NETIF_F_UFO)) { + skb_shinfo(skb)->gso_size = mtu - fragheaderlen; + skb_shinfo(skb)->gso_type = SKB_GSO_UDP; +-- +1.7.4.4 + |