Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9948a7e15015e7f2cb602190322b8ebb00c54c8
Commit:     a9948a7e15015e7f2cb602190322b8ebb00c54c8
Parent:     71599cd1c381d1b5f58c35653ac1d3627c6276db
Author:     Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 28 11:05:56 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Feb 28 11:05:56 2007 -0800

    [TCP]: Fix minisock tcp_create_openreq_child() typo.
    
    On 2/28/07, KOVACS Krisztian <[EMAIL PROTECTED]> wrote:
    >
    >   Hi,
    >
    >   While reading TCP minisock code I've found this suspiciously looking
    > code fragment:
    >
    > - 8< -
    > struct sock *tcp_create_openreq_child(struct sock *sk, struct 
request_sock *req, struct sk_buff *skb)
    > {
    >         struct sock *newsk = inet_csk_clone(sk, req, GFP_ATOMIC);
    >
    >         if (newsk != NULL) {
    >                 const struct inet_request_sock *ireq = inet_rsk(req);
    >                 struct tcp_request_sock *treq = tcp_rsk(req);
    >                 struct inet_connection_sock *newicsk = inet_csk(sk);
    >                 struct tcp_sock *newtp;
    > - 8< -
    >
    >   The above code initializes newicsk to inet_csk(sk), isn't that supposed
    > to be inet_csk(newsk)?  As far as I can tell this might leave
    > icsk_ack.last_seg_size zero even if we do have received data.
    
    Good catch!
    
    David, please apply the attached patch.
    
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/tcp_minisocks.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 30b1e52..6b5c64f 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -381,7 +381,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, 
struct request_sock *req,
        if (newsk != NULL) {
                const struct inet_request_sock *ireq = inet_rsk(req);
                struct tcp_request_sock *treq = tcp_rsk(req);
-               struct inet_connection_sock *newicsk = inet_csk(sk);
+               struct inet_connection_sock *newicsk = inet_csk(newsk);
                struct tcp_sock *newtp;
 
                /* Now setup tcp_sock */
-
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