diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-10-26 19:13:42 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-10-26 19:13:42 -0400 |
commit | 129c997aae2045ee6f320611e9c0c491d0b602b8 (patch) | |
tree | 9dfda784b88047e475d0367098c5b9d84704b74a | |
parent | 856aada97f454fc1d99648051885ac7f7ceecf83 (diff) | |
download | longterm-queue-2.6.34-129c997aae2045ee6f320611e9c0c491d0b602b8.tar.gz |
Add skb gro frag0 patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/gro-Only-reset-frag0-when-skb-can-be-pulled.patch | 39 | ||||
-rw-r--r-- | queue/series | 3 |
2 files changed, 42 insertions, 0 deletions
diff --git a/queue/gro-Only-reset-frag0-when-skb-can-be-pulled.patch b/queue/gro-Only-reset-frag0-when-skb-can-be-pulled.patch new file mode 100644 index 0000000..810181c --- /dev/null +++ b/queue/gro-Only-reset-frag0-when-skb-can-be-pulled.patch @@ -0,0 +1,39 @@ +From feaf597619a61226db012776d78053300ef89f82 Mon Sep 17 00:00:00 2001 +From: Herbert Xu <herbert@gondor.apana.org.au> +Date: Wed, 27 Jul 2011 06:16:28 -0700 +Subject: [PATCH] gro: Only reset frag0 when skb can be pulled + +commit 17dd759c67f21e34f2156abcf415e1f60605a188 upstream. + +Currently skb_gro_header_slow unconditionally resets frag0 and +frag0_len. However, when we can't pull on the skb this leaves +the GRO fields in an inconsistent state. + +This patch fixes this by only resetting those fields after the +pskb_may_pull test. + +Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> +Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h +index 0af14f2..0899edf 100644 +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -1261,9 +1261,12 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen) + static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, + unsigned int offset) + { ++ if (!pskb_may_pull(skb, hlen)) ++ return NULL; ++ + NAPI_GRO_CB(skb)->frag0 = NULL; + NAPI_GRO_CB(skb)->frag0_len = 0; +- return pskb_may_pull(skb, hlen) ? skb->data + offset : NULL; ++ return skb->data + offset; + } + + static inline void *skb_gro_mac_header(struct sk_buff *skb) +-- +1.7.7 + diff --git a/queue/series b/queue/series index 4947244..564b135 100644 --- a/queue/series +++ b/queue/series @@ -205,6 +205,9 @@ vmxnet3-Fix-inconsistent-LRO-state-after-initializat.patch # Content taken from v2.6.32.43 taskstats-don-t-allow-duplicate-entries-in-listener-.patch +# Content taken from v2.6.32.44 +gro-Only-reset-frag0-when-skb-can-be-pulled.patch + # others fs-partitions-efi.c-corrupted-GUID-partition-tables-.patch Bluetooth-Prevent-buffer-overflow-in-l2cap-config-re.patch |