diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-05 21:55:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-05 21:55:48 -0400 |
commit | fb5f5e6e0cebd574be737334671d1aa8f170d5f3 (patch) | |
tree | edc95c215cb4929dea3cf391234f648b22f80405 | |
parent | 1198ad002ad36291817c7bf0308ab9c50ee2571d (diff) |
[TCP]: Fix TCP_OFF() bug check introduced by previous change.
The TCP_OFF assignment at the bottom of that if block can indeed set
TCP_OFF without setting TCP_PAGE. Since there is not much to be
gained from avoiding this situation, we might as well just zap the
offset. The following patch should fix it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index cbcc9fc47783..f3f0013a9580 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -769,10 +769,10 @@ new_segment: | |||
769 | if (off == PAGE_SIZE) { | 769 | if (off == PAGE_SIZE) { |
770 | put_page(page); | 770 | put_page(page); |
771 | TCP_PAGE(sk) = page = NULL; | 771 | TCP_PAGE(sk) = page = NULL; |
772 | TCP_OFF(sk) = off = 0; | 772 | off = 0; |
773 | } | 773 | } |
774 | } else | 774 | } else |
775 | BUG_ON(off); | 775 | off = 0; |
776 | 776 | ||
777 | if (copy > PAGE_SIZE - off) | 777 | if (copy > PAGE_SIZE - off) |
778 | copy = PAGE_SIZE - off; | 778 | copy = PAGE_SIZE - off; |