Messages in this thread Patch in this message | | | Date | Thu, 4 Aug 2005 20:35:23 +1000 | Subject | Re: 2.6.13-rc4 - kernel panic - BUG at net/ipv4/tcp_output.c:918 | From | Herbert Xu <> |
| |
On Thu, Aug 04, 2005 at 01:33:29PM +1000, herbert wrote: > > So I suppose we should reset cwnd_quota after tcp_transmit_skb?
Please try this patch to see if this is really the problem or not.
Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1027,19 +1027,14 @@ static int tcp_write_xmit(struct sock *s tcp_minshall_update(tp, mss_now, skb); sent_pkts++; - /* Do not optimize this to use tso_segs. If we chopped up - * the packet above, tso_segs will no longer be valid. - */ - cwnd_quota -= tcp_skb_pcount(skb); - - BUG_ON(cwnd_quota < 0); - if (!cwnd_quota) - break; - skb = sk->sk_send_head; if (!skb) break; + tso_segs = tcp_init_tso_segs(sk, skb, mss_now); + cwnd_quota = tcp_cwnd_test(tp, skb); + if (!cwnd_quota) + break; } if (likely(sent_pkts)) { | |