[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070307231205.GP10574@sequoia.sous-sol.org>
Date: Wed, 7 Mar 2007 15:12:05 -0800
From: Chris Wright <chrisw@...s-sol.org>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: "Theodore Ts'o" <tytso@....edu>,
Zwane Mwaikambo <zwane@....linux.org.uk>,
Justin Forbes <jmforbes@...uxtx.org>,
Chris Wedgwood <reviews@...cw.f00f.org>,
Randy Dunlap <rdunlap@...otime.net>,
Michael Krufky <mkrufky@...uxtv.org>,
Chuck Ebbert <cebbert@...hat.com>,
Dave Jones <davej@...hat.com>,
Chuck Wolber <chuckw@...ntumlinux.com>,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
alan@...rguk.ukuu.org.uk, David Miller <davem@...emloft.net>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [patch 102/101] TCP: Fix minisock tcp_create_openreq_child() typo.
From: Arnaldo Carvalho de Melo <acme@...hat.com>
On 2/28/07, KOVACS Krisztian <hidden@...abit.hu> 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 <acme@...hat.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Chris Wright <chrisw@...s-sol.org>
---
net/ipv4/tcp_minisocks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.20.1.orig/net/ipv4/tcp_minisocks.c
+++ linux-2.6.20.1/net/ipv4/tcp_minisocks.c
@@ -381,7 +381,7 @@ struct sock *tcp_create_openreq_child(st
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists