tree edc95c215cb4929dea3cf391234f648b22f80405
parent 1198ad002ad36291817c7bf0308ab9c50ee2571d
author Herbert Xu <[EMAIL PROTECTED]> Tue, 06 Sep 2005 08:55:48 -0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 06 Sep 2005 08:55:48 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/ipv4/tcp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -769,10 +769,10 @@ new_segment:
                                        if (off == PAGE_SIZE) {
                                                put_page(page);
                                                TCP_PAGE(sk) = page = NULL;
-                                               TCP_OFF(sk) = off = 0;
+                                               off = 0;
                                        }
                                } else
-                                       BUG_ON(off);
+                                       off = 0;
 
                                if (copy > PAGE_SIZE - off)
                                        copy = PAGE_SIZE - off;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to