direct-io.hg

view patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch @ 11522:1fae74cd3963

[POWERPC][XEN] Fix infinite loop caused by hdec storm

This was the cause of the periodic hang on secondary processors that has
been holding back the submission of the SMP patch.

Signed-off-by: Amos Waterland <apw@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Thu Sep 14 22:06:15 2006 -0400 (2006-09-14)
parents d48322cddd87
children
line source
1 diff -urp a/net/ipv4/tcp.c b/net/ipv4/tcp.c
2 --- a/net/ipv4/tcp.c 2006-07-25 14:42:53.194910626 +0100
3 +++ b/net/ipv4/tcp.c 2006-07-25 14:41:00.955501910 +0100
4 @@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
5 if (!pskb_may_pull(skb, thlen))
6 goto out;
8 - segs = NULL;
9 - if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
10 - goto out;
11 -
12 oldlen = (u16)~skb->len;
13 __skb_pull(skb, thlen);
15 + if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
16 + /* Packet is from an untrusted source, reset gso_segs. */
17 + int mss = skb_shinfo(skb)->gso_size;
18 +
19 + skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
20 +
21 + segs = NULL;
22 + goto out;
23 + }
24 +
25 segs = skb_segment(skb, features);
26 if (IS_ERR(segs))
27 goto out;